copyWith method

SyncTheme copyWith({
  1. Color? primary,
  2. Color? success,
  3. Color? error,
  4. Color? warning,
  5. Color? textSecondary,
  6. Color? textPrimary,
  7. Color? background,
  8. Color? surface,
  9. TextStyle? titleStyle,
  10. TextStyle? subtitleStyle,
  11. TextStyle? bodyStyle,
  12. TextStyle? buttonStyle,
  13. TextStyle? captionStyle,
  14. double? borderRadius,
  15. double? spacing,
  16. double? spacingSmall,
  17. 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,
  );
}