bodyAsList<T extends DataModel> method
Implementation
List<T> bodyAsList<T extends DataModel>() {
return (data as List).map((element) {
final T model = DataModel.getType(T).constructor() as T;
model.fromJSON(element);
return model;
}).toList();
}