copyWith method

  1. @useResult
FRootHeaderStyle copyWith({
  1. TextStyle? titleTextStyle,
  2. FHeaderActionStyle? actionStyle,
  3. double? actionSpacing,
  4. EdgeInsets? padding,
})

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

final style = FHeaderStyle(
  titleTextStyle: ...,
  action: ...,
);

final copy = style.copyWith(
  action: ...,
);

print(style.titleTextStyle == copy.titleTextStyle); // true
print(style.action == copy.action); // false

Implementation

@useResult
FRootHeaderStyle copyWith({
  TextStyle? titleTextStyle,
  FHeaderActionStyle? actionStyle,
  double? actionSpacing,
  EdgeInsets? padding,
}) =>
    FRootHeaderStyle(
      titleTextStyle: titleTextStyle ?? this.titleTextStyle,
      actionStyle: actionStyle ?? this.actionStyle,
      actionSpacing: actionSpacing ?? this.actionSpacing,
      padding: padding ?? this.padding,
    );