copyWith method

  1. @useResult
FItemStyle copyWith({
  1. ShapeBorder? shape = Sentinels.shapeBorder,
  2. FVariantsValueDelta<FTappableVariantConstraint, FTappableVariant, Color?, Delta>? backgroundColor,
  3. EdgeInsetsGeometryDelta? margin,
  4. FVariantsDelta<FTappableVariantConstraint, FTappableVariant, Decoration, DecorationDelta>? decoration,
  5. FItemContentStyleDelta? contentStyle,
  6. FRawItemContentStyleDelta? rawItemContentStyle,
  7. FTappableStyleDelta? tappableStyle,
  8. FFocusedOutlineStyle? focusedOutlineStyle = Sentinels.focusedOutlineStyle,
})

Returns a copy of this FItemStyle with the given properties replaced.

See customizing widget styles.

Parameters

Implementation

@useResult
FItemStyle copyWith({
  ShapeBorder? shape = Sentinels.shapeBorder,
  FVariantsValueDelta<FTappableVariantConstraint, FTappableVariant, Color?, Delta>? backgroundColor,
  EdgeInsetsGeometryDelta? margin,
  FVariantsDelta<FTappableVariantConstraint, FTappableVariant, Decoration, DecorationDelta>? decoration,
  FItemContentStyleDelta? contentStyle,
  FRawItemContentStyleDelta? rawItemContentStyle,
  FTappableStyleDelta? tappableStyle,
  FFocusedOutlineStyle? focusedOutlineStyle = Sentinels.focusedOutlineStyle,
}) => .new(
  shape: shape == Sentinels.shapeBorder ? this.shape : shape,
  backgroundColor: backgroundColor?.call(this.backgroundColor) ?? this.backgroundColor,
  margin: margin?.call(this.margin) ?? this.margin,
  decoration: decoration?.call(this.decoration) ?? this.decoration,
  contentStyle: contentStyle?.call(this.contentStyle) ?? this.contentStyle,
  rawItemContentStyle: rawItemContentStyle?.call(this.rawItemContentStyle) ?? this.rawItemContentStyle,
  tappableStyle: tappableStyle?.call(this.tappableStyle) ?? this.tappableStyle,
  focusedOutlineStyle: focusedOutlineStyle == Sentinels.focusedOutlineStyle
      ? this.focusedOutlineStyle
      : focusedOutlineStyle,
);