copyWith method

ZeroAppBarStyle copyWith({
  1. Color? backgroundColor,
  2. Color? foregroundColor,
  3. double? height,
  4. TextStyle? titleStyle,
  5. bool? centerTitle,
  6. Brightness? statusBarBrightness,
  7. double? elevation,
  8. Color? shadowColor,
  9. double? titleSpacing,
})

If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.

A new instance of ZeroAppBarStyle with the same properties as the original instance, except for the properties that are explicitly overridden.

Implementation

ZeroAppBarStyle copyWith({
  Color? backgroundColor,
  Color? foregroundColor,
  double? height,
  TextStyle? titleStyle,
  bool? centerTitle,
  Brightness? statusBarBrightness,
  double? elevation,
  Color? shadowColor,
  double? titleSpacing,
}) {
  return ZeroAppBarStyle(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregroundColor: foregroundColor ?? this.foregroundColor,
    height: height ?? this.height,
    titleStyle: titleStyle ?? this.titleStyle,
    centerTitle: centerTitle ?? this.centerTitle,
    statusBarBrightness: statusBarBrightness ?? this.statusBarBrightness,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    titleSpacing: titleSpacing ?? titleSpacing,
  );
}