copyWith method
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,
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(),
);
}