configList function

List? configList(
  1. Map<String, Object?> json,
  2. String key
)

Reads a raw List from json at key. Returns null if missing or wrong type.

Implementation

List<dynamic>? configList(Map<String, Object?> json, String key) {
  final value = json[key];
  return value is List ? value : null;
}