getUsersRandom method

Future<List<UserModel>?> getUsersRandom(
  1. dynamic skip
)

Implementation

Future<List<UserModel>?> getUsersRandom(skip) {
  return _httpService.getUsersRandom(skip).then((data) async {
    if (data.statusCode == 200) {
      List<dynamic> users = json.decode(data.body);
      List<UserModel> usersList =
          users.map((i) => UserModel.fromJson(i)).toList();
      return usersList;
    } else {
      return null;
    }
  });
}