fetchAllUsers method
override
Fetches all users.
Implementation
@override
Future<List<User>> fetchAllUsers() async {
final response = await apiService.callFunction(
function: "local_lbplanner_user_get_all_users",
token: userToken.lbPlannerApiToken,
body: {},
);
if (response.failed) {
throw Exception("Failed to fetch users");
}
return List.from(response.expectMultiple())
.map((e) => User.fromJson(e))
.toList();
}