copyWith method

NoDefaultCupertinoThemeData copyWith({
  1. Brightness? brightness,
  2. Color? primaryColor,
  3. Color? primaryContrastingColor,
  4. CupertinoTextThemeData? textTheme,
  5. Color? barBackgroundColor,
  6. Color? scaffoldBackgroundColor,
  7. bool? applyThemeToAll,
})

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

NoDefaultCupertinoThemeData copyWith({
  Brightness? brightness,
  Color? primaryColor,
  Color? primaryContrastingColor,
  CupertinoTextThemeData? textTheme,
  Color? barBackgroundColor ,
  Color? scaffoldBackgroundColor,
  bool? applyThemeToAll,
}) {
  return NoDefaultCupertinoThemeData(
    brightness: brightness ?? this.brightness,
    primaryColor: primaryColor ?? this.primaryColor,
    primaryContrastingColor: primaryContrastingColor ?? this.primaryContrastingColor,
    textTheme: textTheme ?? this.textTheme,
    barBackgroundColor: barBackgroundColor ?? this.barBackgroundColor,
    scaffoldBackgroundColor: scaffoldBackgroundColor ?? this.scaffoldBackgroundColor,
    applyThemeToAll: applyThemeToAll ?? this.applyThemeToAll,
  );
}