Get map value by key as list.
List<dynamic>? getList(String key) { if (!this.containsKey(key)) { return null; } if (this[key] is! List) { return null; } return this[key]; }