put method

void put(
  1. K key,
  2. V value
)

Put key value

Implementation

void put(K key, V value) {
  if ( !data.containsKey(key) ) {
    List<V> newList = [];
    data[key] = newList;
    newList.add(value);
  } else {
    data[key]!.add(value);
  }
}