assign method Null safety

void assign(
  1. K key,
  2. V val
)

Implementation

void assign(K key, V val) {
  if (this is RxMap) {
    final map = (this as RxMap);
    // map._value;
    map._value.clear();
    this[key] = val;
  } else {
    clear();
    this[key] = val;
  }
}