getUser method
override
Fetches the data for a given user.
If id
is not provided, the data for the user associated with the token
is fetched.
Implementation
@override
Future<User> getUser(String token, {String? id}) async {
final response = await _api.callFunction(
function: 'local_lbplanner_user_get_user',
token: token,
body: {
'userid': id,
},
);
response.assertJson();
return User.fromJson(response.asJson);
}