merge method

ColorThemeData merge(
  1. ColorThemeData? other
)

Creates a copy of this ColorThemeData but with the given fields replaced with the new values.

Implementation

ColorThemeData merge(ColorThemeData? other) {
  // if null return current object
  if (other == null) return this;

  return copyWith(
    danger: other.danger,
    warning: other.warning,
    success: other.success,
    info: other.info,
  );
}