operator [] method

int operator [](
  1. String name
)

Value of the constant name (see names).

Implementation

int operator [](String name) {
  final value = _values[name];
  if (value == null) {
    throw ArgumentError.value(name, 'name', 'no such constant');
  }
  return value;
}