copyWith method

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

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

See customizing widget styles.

Parameters

Implementation

@useResult
FItemStyle copyWith({
  FVariantsValueDelta<FTappableVariantConstraint, FTappableVariant, Color?, Delta>? backgroundColor,
  FVariantsDelta<FTappableVariantConstraint, FTappableVariant, Decoration, DecorationDelta>? contentDecoration,
  FItemContentStyleDelta? contentStyle,
  FRawItemContentStyleDelta? rawContentStyle,
  FTappableStyleDelta? tappableStyle,
  FFocusedOutlineStyle? focusedOutlineStyle = Sentinels.focusedOutlineStyle,
  EdgeInsetsGeometryDelta? padding,
  ShapeBorder? shape = Sentinels.shapeBorder,
}) => .new(
  backgroundColor: backgroundColor?.call(this.backgroundColor) ?? this.backgroundColor,
  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,
  padding: padding?.call(this.padding) ?? this.padding,
  shape: shape == Sentinels.shapeBorder ? this.shape : shape,
);