copyWith method

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

Implementation

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