convertResponseToList<T> static method
dynamic
convertResponseToList<T>(
- Response response,
- dynamic func
response from the server.
func is passed as the <T>.fromJson for any model
Implementation
static dynamic convertResponseToList<T>(Response response, func) {
final json = Utils.parseResponseAsJson(response);
return json.map((e) => func(e)).cast<T>().toList();
}