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

Makes transition completer type nullable #92

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jfacoustic
Copy link

@jfacoustic jfacoustic commented Dec 28, 2022

This PR fixes the following error:

When I try to show the flushbar before popping to another route, I get the exception:

_TypeError (type 'Null' is not a subtype of type 'FutureOr<String>')

This occurs in the dispose method in the FlushbarRoute. At that point, I'm trying to dispose of a flushbar of type <String>, but _result is null:

  @override
 void dispose() {
   assert(!_transitionCompleter.isCompleted,
       'Cannot dispose a $runtimeType twice.');
   _controller?.dispose();
   _transitionCompleter.complete(_result);
   super.dispose();
 }

@cmdrootaccess
Copy link
Owner

good work but can you please provide an example of how this error occurs ?

@jfacoustic jfacoustic force-pushed the nullable-transition-completer-type branch 2 times, most recently from f585e6b to 52865f0 Compare September 20, 2023 21:57
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

Successfully merging this pull request may close these issues.

2 participants