getUsers method

  1. @override
Future<List<User>> getUsers(
  1. String token, {
  2. String? vintage,
})
override

Fetches all users.

If vintage is provided, only users in the given class are fetched.

Implementation

@override
Future<List<User>> getUsers(String token, {String? vintage}) async {
  final response = await _api.callFunction(
    function: 'local_lbplanner_user_get_all_users',
    token: token,
    body: {
      'vintage': vintage,
    },
  );

  response.assertList();

  return response.asList.map(User.fromJson).toList();
}