readOptionalMap<K, V> method

Map<K, V>? readOptionalMap<K, V>(
  1. Map<String, Object?> obj,
  2. String field
)

Reads an optional Map of types K,V from field in obj.

Implementation

Map<K, V>? readOptionalMap<K, V>(
  Map<String, Object?> obj,
  String field,
) {
  return obj.containsKey(field) ? readMap<K, V>(obj, field) : null;
}