toMap method Null safety

Map<K, V> toMap()

Implementation

Map<K, V> toMap() {
  return Map.fromEntries(this);
}