getCurrentUserFromServer static method

Future<ParseResponse?> getCurrentUserFromServer(
  1. String token,
  2. {bool? debug,
  3. ParseClient? client}
)

Gets the current user from the server

Current user is stored locally, but in case of a server update bool fromServer can be called and an updated version of the User object will be returned.

NOTE: If using custom ParseUserObject create instance and user getUpdatedUser

Implementation

static Future<ParseResponse?> getCurrentUserFromServer(String token,
    {bool? debug, ParseClient? client}) async {
  final ParseUser user = _getEmptyUser();
  user.sessionToken = token;
  return user.getUpdatedUser(debug: debug, client: client);
}