copyWith method

FlexColorScheme copyWith({
  1. Brightness? brightness,
  2. Color? primary,
  3. Color? primaryVariant,
  4. Color? secondary,
  5. Color? secondaryVariant,
  6. Color? surface,
  7. Color? background,
  8. Color? error,
  9. Color? scaffoldBackground,
  10. Color? appBarBackground,
  11. Color? onPrimary,
  12. Color? onSecondary,
  13. Color? onSurface,
  14. Color? onBackground,
  15. Color? onError,
  16. FlexTabBarStyle? tabBarStyle,
  17. double? appBarElevation,
  18. double? bottomAppBarElevation,
  19. bool? tooltipsMatchBackground,
  20. bool? transparentStatusBar,
  21. VisualDensity? visualDensity,
  22. String? fontFamily,
  23. TargetPlatform? platform,
  24. 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,
  );
}