copyWith method

  1. @override
KinTheme copyWith({
  1. Color? primary,
  2. Color? primaryContainer,
  3. Color? surface,
  4. Color? surfaceVariant,
  5. Color? onSurface,
  6. Color? onSurfaceVariant,
  7. Color? outline,
  8. Color? destructive,
  9. Color? success,
  10. Color? warning,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
KinTheme copyWith({
  Color? primary,
  Color? primaryContainer,
  Color? surface,
  Color? surfaceVariant,
  Color? onSurface,
  Color? onSurfaceVariant,
  Color? outline,
  Color? destructive,
  Color? success,
  Color? warning,
}) {
  return KinTheme(
    primary: primary ?? this.primary,
    primaryContainer: primaryContainer ?? this.primaryContainer,
    surface: surface ?? this.surface,
    surfaceVariant: surfaceVariant ?? this.surfaceVariant,
    onSurface: onSurface ?? this.onSurface,
    onSurfaceVariant: onSurfaceVariant ?? this.onSurfaceVariant,
    outline: outline ?? this.outline,
    destructive: destructive ?? this.destructive,
    success: success ?? this.success,
    warning: warning ?? this.warning,
  );
}