castFrom static method

Name castFrom(
  1. Object value
)

Implementation

static Name castFrom(Object value) {
  if (value is Name) {
    return value;
  }
  if (value is String) {
    return Name(value);
  }
  throw ArgumentError('Unknown Name value: $value');
}