copyWith method

  1. @override
AppThemeExtension copyWith({
  1. Color? primary,
  2. Color? secondary,
  3. Color? success,
  4. Color? error,
  5. Color? warning,
  6. Color? info,
  7. Gradient? brandGradient,
  8. Color? surface,
  9. AppBarStyle? appBarStyle,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
AppThemeExtension copyWith({
  Color? primary,
  Color? secondary,
  Color? success,
  Color? error,
  Color? warning,
  Color? info,
  Gradient? brandGradient,
  Color? surface,
  AppBarStyle? appBarStyle,
}) =>
    AppThemeExtension(
      primary: primary ?? this.primary,
      secondary: secondary ?? this.secondary,
      success: success ?? this.success,
      error: error ?? this.error,
      warning: warning ?? this.warning,
      info: info ?? this.info,
      brandGradient: brandGradient ?? this.brandGradient,
      surface: surface ?? this.surface,
      appBarStyle: appBarStyle ?? this.appBarStyle,
    );