copyWith method

ThemeData copyWith({
  1. ColorScheme? colorScheme,
  2. double? radius,
  3. Typography? typography,
  4. TargetPlatform? platform,
  5. double? scaling,
  6. IconThemeProperties? iconTheme,
  7. double? surfaceOpacity,
  8. double? surfaceBlur,
})

Implementation

ThemeData copyWith({
  ColorScheme? colorScheme,
  double? radius,
  Typography? typography,
  TargetPlatform? platform,
  double? scaling,
  IconThemeProperties? iconTheme,
  double? surfaceOpacity,
  double? surfaceBlur,
}) {
  return ThemeData(
    colorScheme: colorScheme ?? this.colorScheme,
    radius: radius ?? this.radius,
    typography: typography ?? this.typography,
    platform: platform ?? _platform,
    scaling: scaling ?? this.scaling,
    iconTheme: iconTheme ?? this.iconTheme,
    surfaceOpacity: surfaceOpacity ?? this.surfaceOpacity,
    surfaceBlur: surfaceBlur ?? this.surfaceBlur,
  );
}