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 #56

Closed
zzzaJ opened this issue Dec 15, 2021 · 3 comments
Closed

Unhandled Exception: Null check operator used on a null value #56

zzzaJ opened this issue Dec 15, 2021 · 3 comments

Comments

@zzzaJ
Copy link

zzzaJ commented Dec 15, 2021

When trying to show a FlushbarHelper.createSuccess() flusher, it fails with the following error and trace stack:

Unhandled Exception: Null check operator used on a null value
#0 StatefulElement.state
package:flutter/…/widgets/framework.dart:4789
#1 Navigator.of
package:flutter/…/widgets/navigator.dart:2730
#2 Flushbar.show
package:another_flushbar/flushbar.dart:233
#3 _LoginState.build.
package:app/…/auth/login.dart:258

I am not sure why this is the case, and any help or advice would be great.

@kcchenkd
Copy link

kcchenkd commented Jan 5, 2022

Observing the same error on 1.10.28 version

I/flutter ( 4761): ----------------FIREBASE CRASHLYTICS----------------
I/flutter ( 4761): Null check operator used on a null value
I/flutter ( 4761):
I/flutter ( 4761): #0 StatefulElement.state
package:flutter/…/widgets/framework.dart:4712
I/flutter ( 4761): #1 Navigator.of
package:flutter/…/widgets/navigator.dart:2542
I/flutter ( 4761): #2 Flushbar.show
package:another_flushbar/flushbar.dart:233
I/flutter ( 4761): #3 _HomePageState._showFlushBar
package:groubing/…/pages/home_page.dart:358
I/flutter ( 4761): #4 _HomePageState._configureFcm.
package:groubing/…/pages/home_page.dart:301
I/flutter ( 4761): #5 _rootRunUnary (dart:async/zone.dart:1436:47)
I/flutter ( 4761): #6 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
I/flutter ( 4761): #7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
I/flutter ( 4761): #8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
I/flutter ( 4761): #9 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
I/flutter ( 4761): #10 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
I/flutter ( 4761): #11 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
I/flutter ( 4761): #12 _rootRun (dart:async/zone.dart:1420:47)
I/flutter ( 4761): #13 _CustomZone.run (dart:async/zone.dart:1328:19)
I/flutter ( 4761): #14 _
I/flutter ( 4761): ----------------------------------------------------

@bagus-repository
Copy link

I do have same issue

@cyb9701
Copy link

cyb9701 commented Jan 26, 2022

The reason for this error is that the Flushbar result value is null.
Therefore, if the bool enables null, no error occurs.

Flushbar<bool?>? _flushBar;

_flushBar = Flushbar<bool?>()

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

5 participants