values property

The allowed enum values.

Implementation

Iterable<EnumValueWithTitle> get values {
  final values =
      ((_value[Keys.items] as Map?)?[Keys.anyOf] as Iterable?)
          ?.cast<EnumValueWithTitle>();
  if (values == null) {
    throw ArgumentError('Missing required property "${Keys.anyOf}"');
  }
  assert(
    values.toSet().length == values.length,
    "The '${Keys.anyOf}' property has duplicate entries.",
  );
  return values;
}