copyWith method

  1. @override
ThemeExtension<ScaffoldThemeExtension> copyWith({
  1. Color? backgroundColor,
  2. Color? foregourendColor,
})
override

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

Implementation

@override
ThemeExtension<ScaffoldThemeExtension> copyWith({
  Color? backgroundColor,
  Color? foregourendColor,
}) {
  return ScaffoldThemeExtension(
    backgroundColor: backgroundColor ?? this.backgroundColor,
    foregourendColor: foregourendColor ?? this.foregourendColor,
  );
}