tryReadMap method

Map? tryReadMap(
  1. dynamic source,
  2. dynamic key
)

Tries to read a map value from the source. If the value is not a map, it returns null.

Implementation

Map? tryReadMap(source, key) {
  var value = readValue(source, key);
  return isMap(value) ? value as Map : null;
}