getList method

List? getList(
  1. String key
)

Get map value by key as list.

Implementation

List<dynamic>? getList(String key) {
  if (!this.containsKey(key)) {
    return null;
  }

  if (this[key] is! List) {
    return null;
  }

  return this[key];
}