findAll method

Future<List<UserInfo>> findAll(
  1. String name, {
  2. int? take,
})

List users filtered by name

Implementation

Future<List<UserInfo>> findAll(String name, {int? take}) async {
  final response =
      await dio.get('/account/list', queryParameters: {'name': name});
  return (response.data as List).map((e) => UserInfo.fromJson(e)).toList();
}