copyWith method

  1. @override
ExtraColors copyWith({
  1. ColorScheme? success,
  2. ColorScheme? warning,
  3. ColorScheme? error,
  4. ColorScheme? info,
})
override

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

Implementation

@override
ExtraColors copyWith({
  ColorScheme? success,
  ColorScheme? warning,
  ColorScheme? error,
  ColorScheme? info,
}) {
  return ExtraColors(
    success: success ?? this.success,
    warning: warning ?? this.warning,
    error: error ?? this.error,
    info: info ?? this.info,
  );
}