getList method
Get a List<Map<String, dynamic>>> from a map.
Implementation
List<Map<String, dynamic>>? getList(String key) {
var v = this[key];
if (v == null) {
return null;
}
if (v is! List<dynamic>) {
throw Exception('Invalid type: ${v.runtimeType} should be of type List');
}
return (v.toList()).cast<Map<String, dynamic>>();
}