operator []= method

  1. @override
void operator []=(
  1. dynamic key,
  2. dynamic value
)
override

Associates the key with the given value.

If the key was already in the map, its associated value is changed. Otherwise the key/value pair is added to the map.

Implementation

@override
void operator []=(key, value) {
  _value[key] = value;
  if (typesMap.containsKey(value.runtimeType.toString())) {
    // if the value is a dart type
    Type type = typesMap[value.runtimeType.toString()]!;
    _value[key] = RadTypes.instance(type, value, {});
  } else if (typesList.contains(value.runtimeType)) {
    // if the value is a RadonType
    _value[key] = value;
  }
}