copyWith method
- Brightness? brightness,
- Color? primaryColor,
- Color? primaryContrastingColor,
- CupertinoTextThemeData? textTheme,
- Color? barBackgroundColor,
- Color? scaffoldBackgroundColor,
- bool? applyThemeToAll,
override
Copies the ThemeData's cupertinoOverrideTheme
.
Only the specified override attributes of the ThemeData's
cupertinoOverrideTheme
and the newly specified parameters are in the
returned CupertinoThemeData. No derived attributes from iOS defaults or
from cascaded Material theme attributes are copied.
This copyWith cannot change the base Material ThemeData. To change the base Material ThemeData, create a new Material Theme and use ThemeData.copyWith on the Material ThemeData instead.
Implementation
@override
MaterialBasedCupertinoThemeData copyWith({
Brightness? brightness,
Color? primaryColor,
Color? primaryContrastingColor,
CupertinoTextThemeData? textTheme,
Color? barBackgroundColor,
Color? scaffoldBackgroundColor,
bool? applyThemeToAll,
}) {
return MaterialBasedCupertinoThemeData._(
_materialTheme,
_cupertinoOverrideTheme.copyWith(
brightness: brightness,
primaryColor: primaryColor,
primaryContrastingColor: primaryContrastingColor,
textTheme: textTheme,
barBackgroundColor: barBackgroundColor,
scaffoldBackgroundColor: scaffoldBackgroundColor,
applyThemeToAll: applyThemeToAll,
),
);
}