getCurrentUser static method
get current logged in user's profile.
Implementation
static Future<AuthResult> getCurrentUser(
[bool? customData, bool? identities, bool? departmentIds]) async {
bool customDataBool = customData == null ? false : true;
bool identitiesBool = identities == null ? false : true;
bool departmentIdsBool = departmentIds == null ? false : true;
String url = '/api/v3/get-profile?withCustomData=' +
customDataBool.toString() +
'&withIdentities=' +
identitiesBool.toString() +
'&withDepartmentIds=' +
departmentIdsBool.toString();
final Result result = await get(url);
AuthResult authResult = AuthResult(result);
authResult.user = await createUser(result);
return authResult;
}