copyWith method
- Brightness? brightness,
- Color? primaryColor,
- Color? primaryContrastingColor,
- CupertinoTextThemeData? textTheme,
- Color? barBackgroundColor,
- Color? scaffoldBackgroundColor,
- bool? applyThemeToAll,
override
Creates a copy of the theme data with specified attributes overridden.
Only the current instance's specified attributes are copied instead of
derived values. For instance, if the current textTheme
is implied from
the current primaryColor
because it was not specified, copying with a
different primaryColor
will also change the copy's implied textTheme
.
Implementation
@override
CupertinoThemeData copyWith({
Brightness? brightness,
Color? primaryColor,
Color? primaryContrastingColor,
CupertinoTextThemeData? textTheme,
Color? barBackgroundColor,
Color? scaffoldBackgroundColor,
bool? applyThemeToAll,
}) {
return CupertinoThemeData._rawWithDefaults(
brightness ?? super.brightness,
primaryColor ?? super.primaryColor,
primaryContrastingColor ?? super.primaryContrastingColor,
textTheme ?? super.textTheme,
barBackgroundColor ?? super.barBackgroundColor,
scaffoldBackgroundColor ?? super.scaffoldBackgroundColor,
applyThemeToAll ?? super.applyThemeToAll,
_defaults,
);
}