copyWith method
- Brightness? brightness,
- Color? primary,
- Color? onPrimary,
- Color? primaryContainer,
- Color? onPrimaryContainer,
- Color? primaryFixed,
- Color? primaryFixedDim,
- Color? onPrimaryFixed,
- Color? onPrimaryFixedVariant,
- Color? secondary,
- Color? onSecondary,
- Color? secondaryContainer,
- Color? onSecondaryContainer,
- Color? secondaryFixed,
- Color? secondaryFixedDim,
- Color? onSecondaryFixed,
- Color? onSecondaryFixedVariant,
- Color? tertiary,
- Color? onTertiary,
- Color? tertiaryContainer,
- Color? onTertiaryContainer,
- Color? tertiaryFixed,
- Color? tertiaryFixedDim,
- Color? onTertiaryFixed,
- Color? onTertiaryFixedVariant,
- Color? error,
- Color? onError,
- Color? errorContainer,
- Color? onErrorContainer,
- Color? surface,
- Color? onSurface,
- Color? surfaceDim,
- Color? surfaceBright,
- Color? surfaceContainerLowest,
- Color? surfaceContainerLow,
- Color? surfaceContainer,
- Color? surfaceContainerHigh,
- Color? surfaceContainerHighest,
- Color? onSurfaceVariant,
- Color? outline,
- Color? outlineVariant,
- Color? shadow,
- Color? scrim,
- Color? inverseSurface,
- Color? onInverseSurface,
- Color? inversePrimary,
- Color? surfaceTint,
- @Deprecated('Use surface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? background,
- @Deprecated('Use onSurface instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? onBackground,
- @Deprecated('Use surfaceContainerHighest instead. ' 'This feature was deprecated after v3.18.0-0.1.pre.') Color? surfaceVariant,
Creates a copy of this color scheme with the given fields replaced by the non-null parameter values.
Implementation
ColorScheme copyWith({
Brightness? brightness,
Color? primary,
Color? onPrimary,
Color? primaryContainer,
Color? onPrimaryContainer,
Color? primaryFixed,
Color? primaryFixedDim,
Color? onPrimaryFixed,
Color? onPrimaryFixedVariant,
Color? secondary,
Color? onSecondary,
Color? secondaryContainer,
Color? onSecondaryContainer,
Color? secondaryFixed,
Color? secondaryFixedDim,
Color? onSecondaryFixed,
Color? onSecondaryFixedVariant,
Color? tertiary,
Color? onTertiary,
Color? tertiaryContainer,
Color? onTertiaryContainer,
Color? tertiaryFixed,
Color? tertiaryFixedDim,
Color? onTertiaryFixed,
Color? onTertiaryFixedVariant,
Color? error,
Color? onError,
Color? errorContainer,
Color? onErrorContainer,
Color? surface,
Color? onSurface,
Color? surfaceDim,
Color? surfaceBright,
Color? surfaceContainerLowest,
Color? surfaceContainerLow,
Color? surfaceContainer,
Color? surfaceContainerHigh,
Color? surfaceContainerHighest,
Color? onSurfaceVariant,
Color? outline,
Color? outlineVariant,
Color? shadow,
Color? scrim,
Color? inverseSurface,
Color? onInverseSurface,
Color? inversePrimary,
Color? surfaceTint,
@Deprecated(
'Use surface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
)
Color? background,
@Deprecated(
'Use onSurface instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
)
Color? onBackground,
@Deprecated(
'Use surfaceContainerHighest instead. '
'This feature was deprecated after v3.18.0-0.1.pre.'
)
Color? surfaceVariant,
}) {
return ColorScheme(
brightness: brightness ?? this.brightness,
primary : primary ?? this.primary,
onPrimary : onPrimary ?? this.onPrimary,
primaryContainer : primaryContainer ?? this.primaryContainer,
onPrimaryContainer : onPrimaryContainer ?? this.onPrimaryContainer,
primaryFixed: primaryFixed ?? this.primaryFixed,
primaryFixedDim: primaryFixedDim ?? this.primaryFixedDim,
onPrimaryFixed: onPrimaryFixed ?? this.onPrimaryFixed,
onPrimaryFixedVariant: onPrimaryFixedVariant ?? this.onPrimaryFixedVariant,
secondary : secondary ?? this.secondary,
onSecondary : onSecondary ?? this.onSecondary,
secondaryContainer : secondaryContainer ?? this.secondaryContainer,
onSecondaryContainer : onSecondaryContainer ?? this.onSecondaryContainer,
secondaryFixed: secondaryFixed ?? this.secondaryFixed,
secondaryFixedDim: secondaryFixedDim ?? this.secondaryFixedDim,
onSecondaryFixed: onSecondaryFixed ?? this.onSecondaryFixed,
onSecondaryFixedVariant: onSecondaryFixedVariant ?? this.onSecondaryFixedVariant,
tertiary : tertiary ?? this.tertiary,
onTertiary : onTertiary ?? this.onTertiary,
tertiaryContainer : tertiaryContainer ?? this.tertiaryContainer,
onTertiaryContainer : onTertiaryContainer ?? this.onTertiaryContainer,
tertiaryFixed: tertiaryFixed ?? this.tertiaryFixed,
tertiaryFixedDim: tertiaryFixedDim ?? this.tertiaryFixedDim,
onTertiaryFixed: onTertiaryFixed ?? this.onTertiaryFixed,
onTertiaryFixedVariant: onTertiaryFixedVariant ?? this.onTertiaryFixedVariant,
error : error ?? this.error,
onError : onError ?? this.onError,
errorContainer : errorContainer ?? this.errorContainer,
onErrorContainer : onErrorContainer ?? this.onErrorContainer,
surface : surface ?? this.surface,
onSurface : onSurface ?? this.onSurface,
surfaceDim : surfaceDim ?? this.surfaceDim,
surfaceBright : surfaceBright ?? this.surfaceBright,
surfaceContainerLowest : surfaceContainerLowest ?? this.surfaceContainerLowest,
surfaceContainerLow : surfaceContainerLow ?? this.surfaceContainerLow,
surfaceContainer : surfaceContainer ?? this.surfaceContainer,
surfaceContainerHigh : surfaceContainerHigh ?? this.surfaceContainerHigh,
surfaceContainerHighest : surfaceContainerHighest ?? this.surfaceContainerHighest,
onSurfaceVariant : onSurfaceVariant ?? this.onSurfaceVariant,
outline : outline ?? this.outline,
outlineVariant : outlineVariant ?? this.outlineVariant,
shadow : shadow ?? this.shadow,
scrim : scrim ?? this.scrim,
inverseSurface : inverseSurface ?? this.inverseSurface,
onInverseSurface : onInverseSurface ?? this.onInverseSurface,
inversePrimary : inversePrimary ?? this.inversePrimary,
surfaceTint: surfaceTint ?? this.surfaceTint,
// DEPRECATED (newest deprecations at the bottom)
background : background ?? this.background,
onBackground : onBackground ?? this.onBackground,
surfaceVariant : surfaceVariant ?? this.surfaceVariant,
);
}