copyWith method

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

Copies the ThemeData's cupertinoOverrideTheme.

Only the specified override attributes of the ThemeData's cupertinoOverrideTheme and the newly specified parameters are in the returned CupertinoThemeData. No derived attributes from iOS defaults or from cascaded Material theme attributes are copied.

This copyWith cannot change the base Material ThemeData. To change the base Material ThemeData, create a new Material Theme and use ThemeData.copyWith on the Material ThemeData instead.

Implementation

@override
MaterialBasedCupertinoThemeData copyWith({
  Brightness? brightness,
  Color? primaryColor,
  Color? primaryContrastingColor,
  CupertinoTextThemeData? textTheme,
  Color? barBackgroundColor,
  Color? scaffoldBackgroundColor,
  bool? applyThemeToAll,
}) {
  return MaterialBasedCupertinoThemeData._(
    _materialTheme,
    _cupertinoOverrideTheme.copyWith(
      brightness: brightness,
      primaryColor: primaryColor,
      primaryContrastingColor: primaryContrastingColor,
      textTheme: textTheme,
      barBackgroundColor: barBackgroundColor,
      scaffoldBackgroundColor: scaffoldBackgroundColor,
      applyThemeToAll: applyThemeToAll,
    ),
  );
}