Skip to content

Calling ParseUser user = await ParseUser.currentUser(); results in error #291

Closed
@elpitaj

Description

@elpitaj

Im not sure why Im seeing this error. Any help would be appreciated

[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The method 'getString' was called on null.
Receiver: null
Tried calling: getString("flutter_parse_sdk_user")
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
#1 ParseUser._getUserFromLocalStore (package:parse_server_sdk/src/objects/parse_user.dart:333:45)

#2 ParseUser.currentUser (package:parse_server_sdk/src/objects/parse_user.dart:119:20)

#3 UserRepository.getUser (package:la_c/models/user_repository.dart:34:27)

#4 new UserRepository (package:la_c/models/user_repository.dart:27:5)
#5 MyApp.build (package:la_c/main.dart:83:45)
#6 StatelessElement.build (package:flutter/src/widgets/framework.dart:4009:28)
#7 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3941:15)
#8 Element.rebuild (package:flutter/src/widgets/framework.dart:3738:5)
#9 Compo<…>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions