operator [] method

num operator [](
  1. String key
)

Implementation

num operator [](String key) {
  var thisAsMap = toMap();
  if (!thisAsMap.containsKey(key)) {
    throw ArgumentError('`$key` is not a valid key for a $runtimeType');
  }
  return thisAsMap[key]!;
}