copyWith method

FlexColorScheme copyWith({
  1. ColorScheme? colorScheme,
  2. Brightness? brightness,
  3. Color? primary,
  4. Color? primaryContainer,
  5. Color? secondary,
  6. Color? secondaryContainer,
  7. Color? tertiary,
  8. Color? tertiaryContainer,
  9. Color? error,
  10. Color? surface,
  11. Color? background,
  12. Color? scaffoldBackground,
  13. Color? dialogBackground,
  14. Color? appBarBackground,
  15. Color? onPrimary,
  16. Color? onPrimaryContainer,
  17. Color? onSecondary,
  18. Color? onSecondaryContainer,
  19. Color? onTertiary,
  20. Color? onTertiaryContainer,
  21. Color? onSurface,
  22. Color? onBackground,
  23. Color? onError,
  24. Color? surfaceTint,
  25. FlexTabBarStyle? tabBarStyle,
  26. double? appBarElevation,
  27. double? bottomAppBarElevation,
  28. bool? tooltipsMatchBackground,
  29. bool? transparentStatusBar,
  30. VisualDensity? visualDensity,
  31. TextTheme? textTheme,
  32. TextTheme? primaryTextTheme,
  33. String? fontFamily,
  34. List<String>? fontFamilyFallback,
  35. String? package,
  36. MaterialTapTargetSize? materialTapTargetSize,
  37. PageTransitionsTheme? pageTransitionsTheme,
  38. TargetPlatform? platform,
  39. Typography? typography,
  40. bool? applyElevationOverlayColor,
  41. FlexSubThemesData? subThemesData,
  42. bool? useMaterial3,
  43. Iterable<ThemeExtension>? extensions,
})

Copy the object with one or more provided properties changed.

Implementation

FlexColorScheme copyWith({
  ColorScheme? colorScheme,
  Brightness? brightness,
  Color? primary,
  Color? primaryContainer,
  Color? secondary,
  Color? secondaryContainer,
  Color? tertiary,
  Color? tertiaryContainer,
  Color? error,
  Color? surface,
  Color? background,
  Color? scaffoldBackground,
  Color? dialogBackground,
  Color? appBarBackground,
  Color? onPrimary,
  Color? onPrimaryContainer,
  Color? onSecondary,
  Color? onSecondaryContainer,
  Color? onTertiary,
  Color? onTertiaryContainer,
  Color? onSurface,
  Color? onBackground,
  Color? onError,
  Color? surfaceTint,
  FlexTabBarStyle? tabBarStyle,
  double? appBarElevation,
  double? bottomAppBarElevation,
  bool? tooltipsMatchBackground,
  bool? transparentStatusBar,
  VisualDensity? visualDensity,
  TextTheme? textTheme,
  TextTheme? primaryTextTheme,
  String? fontFamily,
  List<String>? fontFamilyFallback,
  String? package,
  MaterialTapTargetSize? materialTapTargetSize,
  PageTransitionsTheme? pageTransitionsTheme,
  TargetPlatform? platform,
  Typography? typography,
  bool? applyElevationOverlayColor,
  FlexSubThemesData? subThemesData,
  bool? useMaterial3,
  Iterable<ThemeExtension<dynamic>>? extensions,
}) {
  return FlexColorScheme(
    colorScheme: colorScheme ?? this.colorScheme,
    brightness: brightness ?? this.brightness,
    primary: primary ?? this.primary,
    primaryContainer: primaryContainer ?? this.primaryContainer,
    secondary: secondary ?? this.secondary,
    secondaryContainer: secondaryContainer ?? this.secondaryContainer,
    tertiary: tertiary ?? this.tertiary,
    tertiaryContainer: tertiaryContainer ?? this.tertiaryContainer,
    error: error ?? this.error,
    surface: surface ?? this.surface,
    background: background ?? this.background,
    scaffoldBackground: scaffoldBackground ?? this.scaffoldBackground,
    appBarBackground: appBarBackground ?? this.appBarBackground,
    dialogBackground: dialogBackground ?? this.dialogBackground,
    onPrimary: onPrimary ?? this.onPrimary,
    onPrimaryContainer: onPrimaryContainer ?? this.onPrimaryContainer,
    onSecondary: onSecondary ?? this.onSecondary,
    onSecondaryContainer: onSecondaryContainer ?? this.onSecondaryContainer,
    onTertiary: onTertiary ?? this.onTertiary,
    onTertiaryContainer: onTertiaryContainer ?? this.onTertiaryContainer,
    onSurface: onSurface ?? this.onSurface,
    onBackground: onBackground ?? this.onBackground,
    onError: onError ?? this.onError,
    surfaceTint: surfaceTint ?? this.surfaceTint,
    tabBarStyle: tabBarStyle ?? this.tabBarStyle,
    appBarElevation: appBarElevation ?? this.appBarElevation,
    bottomAppBarElevation:
        bottomAppBarElevation ?? this.bottomAppBarElevation,
    tooltipsMatchBackground:
        tooltipsMatchBackground ?? this.tooltipsMatchBackground,
    transparentStatusBar: transparentStatusBar ?? this.transparentStatusBar,
    visualDensity: visualDensity ?? this.visualDensity,
    textTheme: textTheme ?? this.textTheme,
    primaryTextTheme: primaryTextTheme ?? this.primaryTextTheme,
    fontFamily: fontFamily ?? this.fontFamily,
    fontFamilyFallback: fontFamilyFallback ?? this.fontFamilyFallback,
    package: package ?? this.package,
    materialTapTargetSize:
        materialTapTargetSize ?? this.materialTapTargetSize,
    pageTransitionsTheme: pageTransitionsTheme ?? this.pageTransitionsTheme,
    platform: platform ?? this.platform,
    typography: typography ?? this.typography,
    applyElevationOverlayColor:
        applyElevationOverlayColor ?? this.applyElevationOverlayColor,
    subThemesData: subThemesData ?? this.subThemesData,
    useMaterial3: useMaterial3 ?? this.useMaterial3,
    extensions: extensions ?? this.extensions,
  );
}