copyWith method

CupertinoThemeData copyWith (
  1. {Brightness brightness,
  2. Color primaryColor,
  3. Color primaryContrastingColor,
  4. CupertinoTextThemeData textTheme,
  5. Color barBackgroundColor,
  6. Color scaffoldBackgroundColor}

Creates a copy of CupertinoThemeData with specified attributes overridden.

Only the current instance's specified attributes are copied instead of derived values. For instance, if the current CupertinoThemeData.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.


CupertinoThemeData copyWith({
  Brightness brightness,
  Color primaryColor,
  Color primaryContrastingColor,
  CupertinoTextThemeData textTheme,
  Color barBackgroundColor,
  Color scaffoldBackgroundColor,
}) {
  return CupertinoThemeData._rawWithDefaults(
    brightness ?? this.brightness,
    primaryColor ?? _primaryColor,
    primaryContrastingColor ?? _primaryContrastingColor,
    textTheme ?? _textTheme,
    barBackgroundColor ?? _barBackgroundColor,
    scaffoldBackgroundColor ?? _scaffoldBackgroundColor,