Skip to content

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.

3 participants