getMap static method

Map? getMap(
  1. Map map,
  2. String key, [
  3. Map? defaultValue
])

Returns the value at key when it is a Map, otherwise defaultValue.

Implementation

static Map? getMap(Map map, String key, [Map? defaultValue]) {
  final v = get(map, key);
  return v is Map ? v : defaultValue;
}