has method

bool has(
  1. K key
)

Checks if the map contains a non-null value for the given key.

Returns true only if the key exists and the value is not null.

Implementation

bool has(K key) {
  return containsKey(key) && this[key] != null;
}