copyWith method

  1. @useResult
FStyle copyWith({
  1. FFormFieldStyle formFieldStyle(
    1. FFormFieldStyle
    )?,
  2. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
  3. IconThemeData? iconStyle,
  4. BorderRadius? borderRadius,
  5. double? borderWidth,
  6. EdgeInsets? pagePadding,
  7. List<BoxShadow>? shadow,
  8. FTappableStyle tappableStyle(
    1. FTappableStyle
    )?,
})

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

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

formFieldStyle

The style for the form field.

focusedOutlineStyle

The focused outline style.

iconStyle

The icon style.

borderRadius

The border radius. Defaults to FLerpBorderRadius.circular(8).

borderWidth

The border width. Defaults to 1.

pagePadding

The page's padding. Defaults to EdgeInsets.symmetric(vertical: 8, horizontal: 12).

shadow

The shadow used for elevated widgets.

tappableStyle

The tappable style.

Implementation

@useResult
FStyle copyWith({
  FFormFieldStyle Function(FFormFieldStyle)? formFieldStyle,
  FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
  IconThemeData? iconStyle,
  BorderRadius? borderRadius,
  double? borderWidth,
  EdgeInsets? pagePadding,
  List<BoxShadow>? shadow,
  FTappableStyle Function(FTappableStyle)? tappableStyle,
}) => FStyle(
  formFieldStyle: formFieldStyle != null ? formFieldStyle(this.formFieldStyle) : this.formFieldStyle,
  focusedOutlineStyle: focusedOutlineStyle != null
      ? focusedOutlineStyle(this.focusedOutlineStyle)
      : this.focusedOutlineStyle,
  iconStyle: iconStyle ?? this.iconStyle,
  borderRadius: borderRadius ?? this.borderRadius,
  borderWidth: borderWidth ?? this.borderWidth,
  pagePadding: pagePadding ?? this.pagePadding,
  shadow: shadow ?? this.shadow,
  tappableStyle: tappableStyle != null ? tappableStyle(this.tappableStyle) : this.tappableStyle,
);