hasKey method

bool hasKey(
  1. String key
)

Checks if the given key exists in the map.

Returns true if any of the keys in the map are equal to key.

Example:

map.hasKey("key") // true

Implementation

bool hasKey(String key) => any(
      (T element) {
        if (element is! Map<T, T>) {
          return false;
        }
        return element.containsKey(key);
      },
    );