extractList<R> method
等待响应完成后,自动提取列表 支持链式调用,适用于提取列表数据
示例:
final users = await http.send(...).extractList<User>('users', User.fromJson);
Implementation
Future<List<R>> extractList<R>(
String key,
R Function(Map<String, dynamic> json) fromJson,
) async {
final response = await this;
return response.extractList<R>(key, fromJson);
}