getUserInfo method
Implementation
Future<Result<UserInfo, Exception>> getUserInfo() async {
final result = await _flutterAuthApi.getUserInfo(_appName);
if (result.isSuccess != true) {
return Result.failure(Exception(result.error ?? "Failed to get user info"));
}
if (result.userInfo == null) {
return Result.failure(Exception("Missing data exception"));
}
return Result.success(ModelUtils.createUserInfoFromPigeon(result.userInfo!));
}