hasKey method

bool hasKey(
  1. dynamic source,
  2. dynamic key
)

Checks if the source contains the given key.

Implementation

bool hasKey(source, key) {
  return isMap(source) && (source as Map).containsKey(key);
}