copyWith method

  1. @useResult
FItemContentStyle copyWith({
  1. EdgeInsetsGeometry? padding,
  2. FWidgetStateMap<IconThemeData>? prefixIconStyle,
  3. double? prefixIconSpacing,
  4. FWidgetStateMap<TextStyle>? titleTextStyle,
  5. double? titleSpacing,
  6. FWidgetStateMap<TextStyle>? subtitleTextStyle,
  7. double? middleSpacing,
  8. FWidgetStateMap<TextStyle>? detailsTextStyle,
  9. FWidgetStateMap<IconThemeData>? suffixIconStyle,
  10. double? suffixIconSpacing,
})

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

Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.

padding

The content's padding. Defaults to const EdgeInsetsDirectional.only(start: 11, top: 7.5, bottom: 7.5, end: 6).

prefixIconStyle

The prefix icon style.

prefixIconSpacing

The horizontal spacing between the prefix icon and title and the subtitle. Defaults to 10.

Contract

Throws AssertionError if prefixIconSpacing is negative.

titleTextStyle

The title's text style.

titleSpacing

The vertical spacing between the title and the subtitle. Defaults to 4.

Contract

Throws AssertionError if titleSpacing is negative.

subtitleTextStyle

The subtitle's text style.

middleSpacing

The minimum horizontal spacing between the title, subtitle, combined, and the details. Defaults to 4.

Contract

Throws AssertionError if middleSpacing is negative.

detailsTextStyle

The details text style.

suffixIconStyle

The suffix icon style.

suffixIconSpacing

The horizontal spacing between the details and suffix icon. Defaults to 10.

Contract

Throws AssertionError if suffixIconSpacing is negative.

Implementation

@useResult
FItemContentStyle copyWith({
  EdgeInsetsGeometry? padding,
  FWidgetStateMap<IconThemeData>? prefixIconStyle,
  double? prefixIconSpacing,
  FWidgetStateMap<TextStyle>? titleTextStyle,
  double? titleSpacing,
  FWidgetStateMap<TextStyle>? subtitleTextStyle,
  double? middleSpacing,
  FWidgetStateMap<TextStyle>? detailsTextStyle,
  FWidgetStateMap<IconThemeData>? suffixIconStyle,
  double? suffixIconSpacing,
}) => FItemContentStyle(
  padding: padding ?? this.padding,
  prefixIconStyle: prefixIconStyle ?? this.prefixIconStyle,
  prefixIconSpacing: prefixIconSpacing ?? this.prefixIconSpacing,
  titleTextStyle: titleTextStyle ?? this.titleTextStyle,
  titleSpacing: titleSpacing ?? this.titleSpacing,
  subtitleTextStyle: subtitleTextStyle ?? this.subtitleTextStyle,
  middleSpacing: middleSpacing ?? this.middleSpacing,
  detailsTextStyle: detailsTextStyle ?? this.detailsTextStyle,
  suffixIconStyle: suffixIconStyle ?? this.suffixIconStyle,
  suffixIconSpacing: suffixIconSpacing ?? this.suffixIconSpacing,
);