getMapList method Null safety

Future<List<Map>> getMapList(
  1. String key
)

Implementation

Future<List<Map>> getMapList(String key) async {
  var response = <Map>[];
  final map = await getMap(key);
  if (map != null) response = (map["values"] as List).cast<Map>();
  return response;
}