operator []= method

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

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

void operator []=(dynamic key, CandidType value) {
    if (this.type_mode==false && this.keys.length > 0) {
        throw Exception('A Variant can only hold one key-value. if this is a type-finition/type-stance, create the Variant(type_mode: true)');
    }
    super[key] = value;
}