copyWith method
- @useResult
- ShapeBorder? shape = Sentinels.shapeBorder,
- FVariantsValueDelta<
FTappableVariantConstraint, FTappableVariant, Color?, Delta> ? backgroundColor, - EdgeInsetsGeometryDelta? padding,
- FVariantsDelta<
FTappableVariantConstraint, FTappableVariant, Decoration, DecorationDelta> ? contentDecoration, - FItemContentStyleDelta? contentStyle,
- FRawItemContentStyleDelta? rawContentStyle,
- FTappableStyleDelta? tappableStyle,
- FFocusedOutlineStyle? focusedOutlineStyle = Sentinels.focusedOutlineStyle,
Returns a copy of this FItemStyle with the given properties replaced.
See customizing widget styles.
Parameters
- FItemStyle.shape - The item's shape, only applied when outside an FItemGroup or other similar groups.
- FItemStyle.backgroundColor - The item's background color, enclosing the
paddingand content, and belowcontentDecoration. - FItemStyle.padding - The padding around the
contentDecoration. - FItemStyle.contentDecoration - The content's decoration, enclosed within
paddingandshape, and abovebackgroundColor. - FItemStyle.contentStyle - The content's style.
- FItemStyle.rawContentStyle - The raw content's style.
- FItemStyle.tappableStyle - The tappable style.
- FItemStyle.focusedOutlineStyle - The focused outline style.
Implementation
@useResult
FItemStyle copyWith({
ShapeBorder? shape = Sentinels.shapeBorder,
FVariantsValueDelta<FTappableVariantConstraint, FTappableVariant, Color?, Delta>? backgroundColor,
EdgeInsetsGeometryDelta? padding,
FVariantsDelta<FTappableVariantConstraint, FTappableVariant, Decoration, DecorationDelta>? contentDecoration,
FItemContentStyleDelta? contentStyle,
FRawItemContentStyleDelta? rawContentStyle,
FTappableStyleDelta? tappableStyle,
FFocusedOutlineStyle? focusedOutlineStyle = Sentinels.focusedOutlineStyle,
}) => .new(
shape: shape == Sentinels.shapeBorder ? this.shape : shape,
backgroundColor: backgroundColor?.call(this.backgroundColor) ?? this.backgroundColor,
padding: padding?.call(this.padding) ?? this.padding,
contentDecoration: contentDecoration?.call(this.contentDecoration) ?? this.contentDecoration,
contentStyle: contentStyle?.call(this.contentStyle) ?? this.contentStyle,
rawContentStyle: rawContentStyle?.call(this.rawContentStyle) ?? this.rawContentStyle,
tappableStyle: tappableStyle?.call(this.tappableStyle) ?? this.tappableStyle,
focusedOutlineStyle: focusedOutlineStyle == Sentinels.focusedOutlineStyle
? this.focusedOutlineStyle
: focusedOutlineStyle,
);