readOptionalList<T> method

List<T>? readOptionalList<T>(
  1. Map<String, Object?> obj,
  2. String field
)

Reads an optional List of values of type T from field in obj.

Implementation

List<T>? readOptionalList<T>(
  Map<String, Object?> obj,
  String field,
) {
  return obj.containsKey(field) ? readList<T>(obj, field) : null;
}