getList method
Get all cards
Implementation
Future<List<CardEntity>> getList() async {
// query
final response = await dio.request('/api/cards');
// mapper
return List<CardEntity>.from(response.data.map((x) => CardEntity.fromJson(x)));
}
Get all cards
Future<List<CardEntity>> getList() async {
// query
final response = await dio.request('/api/cards');
// mapper
return List<CardEntity>.from(response.data.map((x) => CardEntity.fromJson(x)));
}