getList static method

List? getList(
  1. Map map,
  2. String key, [
  3. List? defaultValue
])

Returns the value at key when it is a List, otherwise defaultValue.

Implementation

static List? getList(Map map, String key, [List? defaultValue]) {
  final v = get(map, key);
  return v is List ? v : defaultValue;
}