copyWith method
ThemeExtension<CustomTheme>
copyWith({
- CustomFontStyle? fontStyle,
- CustomColors? colors,
override
Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.
Implementation
@override
ThemeExtension<CustomTheme> copyWith({
CustomFontStyle? fontStyle,
CustomColors? colors,
}) {
return CustomTheme(
colors: colors ?? this.colors,
fontStyle: fontStyle ?? this.fontStyle,
);
}