copyWith method

  1. @useResult
FHeaderStyle copyWith({
  1. SystemUiOverlayStyle? systemOverlayStyle,
  2. BoxDecoration? decoration,
  3. ImageFilter? backgroundFilter,
  4. EdgeInsetsGeometry? padding,
  5. double? actionSpacing,
  6. TextStyle? titleTextStyle,
  7. FHeaderActionStyle actionStyle(
    1. FHeaderActionStyle
    )?,
})

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

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

systemOverlayStyle

The system overlay style.

decoration

The decoration.

backgroundFilter

An optional background filter. This only takes effect if the decoration has a transparent or translucent background color.

This is typically combined with a transparent/translucent background to create a glassmorphic effect.

Examples

// Blurred
ImageFilter.blur(sigmaX: 5, sigmaY: 5);

// Solid color
ColorFilter.mode(Colors.white, BlendMode.srcOver);

// Tinted
ColorFilter.mode(Colors.white.withValues(alpha: 0.5), BlendMode.srcOver);

// Blurred & tinted
ImageFilter.compose(
  outer: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
  inner: ColorFilter.mode(Colors.white.withValues(alpha: 0.5), BlendMode.srcOver),
);

padding

The padding.

actionSpacing

The spacing between FHeaderActions. Defaults to 10.

titleTextStyle

The title's TextStyle.

actionStyle

The FHeaderActions' style.

Implementation

@useResult
FHeaderStyle copyWith({
  SystemUiOverlayStyle? systemOverlayStyle,
  BoxDecoration? decoration,
  ImageFilter? backgroundFilter,
  EdgeInsetsGeometry? padding,
  double? actionSpacing,
  TextStyle? titleTextStyle,
  FHeaderActionStyle Function(FHeaderActionStyle)? actionStyle,
}) => FHeaderStyle(
  systemOverlayStyle: systemOverlayStyle ?? this.systemOverlayStyle,
  decoration: decoration ?? this.decoration,
  backgroundFilter: backgroundFilter ?? this.backgroundFilter,
  padding: padding ?? this.padding,
  actionSpacing: actionSpacing ?? this.actionSpacing,
  titleTextStyle: titleTextStyle ?? this.titleTextStyle,
  actionStyle: actionStyle != null ? actionStyle(this.actionStyle) : this.actionStyle,
);