Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled Exception: Null check operator used on a null value E/flutter #45

Open
waleed099 opened this issue Jul 21, 2022 · 0 comments
Open

Comments

@waleed099
Copy link

void login(String code, RunMutation runMutation) async {
final PhoneAuthCredential credential = PhoneAuthProvider.credential(
verificationId: widget.verificationId, smsCode: code);
final UserCredential cr =
await FirebaseAuth.instance.signInWithCredential(credential);
final String firebaseToken = await cr.user!.getIdToken();
final QueryResult qe =
await runMutation({"firebaseToken": firebaseToken}).networkResult!;
final String jwt = Login$Mutation.fromJson(qe.data!).login.jwtToken;
final Box box = await Hive.openBox('user');
box.put("jwt", jwt);
context.read().login(jwt);
if (!mounted) return;
Navigator.pop(context);
}

@waleed099 waleed099 changed the title How Solve Unhandled Exception: Null check operator used on a null value E/flutter (14787): #0 _LoginVerificationCodeViewState.login How Solved Unhandled Exception: Null check operator used on a null value E/flutter (14787): #0 _LoginVerificationCodeViewState.login Jul 21, 2022
@waleed099 waleed099 changed the title How Solved Unhandled Exception: Null check operator used on a null value E/flutter (14787): #0 _LoginVerificationCodeViewState.login How Solved Unhandled Exception: Null check operator used on a null value E/flutter Jul 21, 2022
@waleed099 waleed099 changed the title How Solved Unhandled Exception: Null check operator used on a null value E/flutter Unhandled Exception: Null check operator used on a null value E/flutter Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant