set<T> method

Color set<T>(
  1. T? value
)

Implementation

Color set<T>(T? value) {
  if (value == null) {
    return this;
  }

  if (value is Color) {
    copy(value);
  } else if (value is int) {
    setHex(value);
  } else if (value is String) {
    setStyle(value);
  } else {
    throw (" Color set use not support type ${value.runtimeType} value: $value ");
  }

  return this;
}