copyWith method
SyncTheme
copyWith({
- Color? primary,
- Color? success,
- Color? error,
- Color? warning,
- Color? textSecondary,
- Color? textPrimary,
- Color? background,
- Color? surface,
- TextStyle? titleStyle,
- TextStyle? subtitleStyle,
- TextStyle? bodyStyle,
- TextStyle? buttonStyle,
- TextStyle? captionStyle,
- double? borderRadius,
- double? spacing,
- double? spacingSmall,
- double? spacingLarge,
Cria uma cópia do tema com valores alterados
Implementation
SyncTheme copyWith({
Color? primary,
Color? success,
Color? error,
Color? warning,
Color? textSecondary,
Color? textPrimary,
Color? background,
Color? surface,
TextStyle? titleStyle,
TextStyle? subtitleStyle,
TextStyle? bodyStyle,
TextStyle? buttonStyle,
TextStyle? captionStyle,
double? borderRadius,
double? spacing,
double? spacingSmall,
double? spacingLarge,
}) {
return SyncTheme(
primary: primary ?? this.primary,
success: success ?? this.success,
error: error ?? this.error,
warning: warning ?? this.warning,
textSecondary: textSecondary ?? this.textSecondary,
textPrimary: textPrimary ?? this.textPrimary,
background: background ?? this.background,
surface: surface ?? this.surface,
titleStyle: titleStyle ?? this.titleStyle,
subtitleStyle: subtitleStyle ?? this.subtitleStyle,
bodyStyle: bodyStyle ?? this.bodyStyle,
buttonStyle: buttonStyle ?? this.buttonStyle,
captionStyle: captionStyle ?? this.captionStyle,
borderRadius: borderRadius ?? this.borderRadius,
spacing: spacing ?? this.spacing,
spacingSmall: spacingSmall ?? this.spacingSmall,
spacingLarge: spacingLarge ?? this.spacingLarge,
);
}