getList<T> static method

Future<List<T>> getList<T>(
  1. String url, {
  2. dynamic body,
  3. Function? fromJson,
  4. String? rootPath,
  5. dynamic bearer = "",
  6. Map<String, String>? headers,
})

Implementation

static Future<List<T>> getList<T>(String url,
    {dynamic body,
    Function? fromJson,
    String? rootPath,
    dynamic bearer = "",
    Map<String, String>? headers}) async {
  var ret = await call('GET', url,
      body: body,
      fromJson: fromJson,
      rootPath: rootPath,
      list: true,
      bearer: bearer,
      headers: headers);
  // print("got response getList");
  // print(ret.runtimeType);
  // print(ret);
  return ret.cast<T>(); //as List<T>;
}