copyWith method
FlexColorScheme
copyWith({
- Brightness? brightness,
- Color? primary,
- Color? primaryVariant,
- Color? secondary,
- Color? secondaryVariant,
- Color? surface,
- Color? background,
- Color? error,
- Color? scaffoldBackground,
- Color? appBarBackground,
- Color? onPrimary,
- Color? onSecondary,
- Color? onSurface,
- Color? onBackground,
- Color? onError,
- FlexTabBarStyle? tabBarStyle,
- double? appBarElevation,
- double? bottomAppBarElevation,
- bool? tooltipsMatchBackground,
- bool? transparentStatusBar,
- VisualDensity? visualDensity,
- String? fontFamily,
- TargetPlatform? platform,
- Typography? typography,
Copy the object with one or more provided properties changed.
Implementation
FlexColorScheme copyWith({
Brightness? brightness,
Color? primary,
Color? primaryVariant,
Color? secondary,
Color? secondaryVariant,
Color? surface,
Color? background,
Color? error,
Color? scaffoldBackground,
Color? appBarBackground,
Color? onPrimary,
Color? onSecondary,
Color? onSurface,
Color? onBackground,
Color? onError,
FlexTabBarStyle? tabBarStyle,
double? appBarElevation,
double? bottomAppBarElevation,
bool? tooltipsMatchBackground,
bool? transparentStatusBar,
VisualDensity? visualDensity,
String? fontFamily,
TargetPlatform? platform,
Typography? typography,
}) {
return FlexColorScheme(
brightness: brightness ?? this.brightness,
primary: primary ?? this.primary,
primaryVariant: primaryVariant ?? this.primaryVariant,
secondary: secondary ?? this.secondary,
secondaryVariant: secondaryVariant ?? this.secondaryVariant,
surface: surface ?? this.surface,
background: background ?? this.background,
error: error ?? this.error,
scaffoldBackground: scaffoldBackground ?? this.scaffoldBackground,
appBarBackground: appBarBackground ?? this.appBarBackground,
onPrimary: onPrimary ?? this.onPrimary,
onSecondary: onSecondary ?? this.onSecondary,
onSurface: onSurface ?? this.onSurface,
onBackground: onBackground ?? this.onBackground,
onError: onError ?? this.onError,
tabBarStyle: tabBarStyle ?? this.tabBarStyle,
appBarElevation: appBarElevation ?? this.appBarElevation,
bottomAppBarElevation:
bottomAppBarElevation ?? this.bottomAppBarElevation,
tooltipsMatchBackground:
tooltipsMatchBackground ?? this.tooltipsMatchBackground,
transparentStatusBar: transparentStatusBar ?? this.transparentStatusBar,
visualDensity: visualDensity ?? this.visualDensity,
fontFamily: fontFamily ?? this.fontFamily,
platform: platform ?? this.platform,
typography: typography ?? this.typography,
);
}