asMapOrNull<T, S> function

Map<T, S>? asMapOrNull<T, S>(
  1. dynamic json,
  2. String key
)

==================== Map conversions

Returns a Map if the value at key is a map, otherwise null.

Implementation

/// Returns a Map if the value at [key] is a map, otherwise null.
Map<T, S>? asMapOrNull<T, S>(dynamic json, String key) {
  final value = _getJsonValueOrNull(json, key);
  return toMapOrNull(value);
}