Open davidfranquet opened 2 years ago
Same here!
Also getting this issue... not sure what is going on or how to resolve it.
This is a bug in Flutter https://github.com/flutter/flutter/issues/98224
Not really, as they say: The Route.didPop is not meant to be called directly, you should use Navigator.pop instead
Yes and further:
The removed route is removed without being completed, so this method does not take a return value argument. The places where I am using didPop to close a route are passing values back to the widget which displayed them. If there is a way of doing that, please let me know.
Also, the Route.didPop thats implemented in FlushbarRoute is an extended class of OverlayRoute, which is part of the Flutter framework and also uses Route.didPop, so the error is part of the Flutter Framework and not this package.
Any update on this?
Happening for me too. I'm also a bit confused as to why FlushBar is doing anything with Routes in the first place... what's the relationship? But yes, it's crashing everything; commenting out the FlushBar causes the issue to go away.
I have the same issue on Flutter 2.10.5 but in my case it's only happening when the flushbar is started while the app is in background.
Basically I have a BLoC listener that triggers a flushbar on some events (e.g. connectivity change). When the flushbar is started there is no problem but when the flushbar is dismissed I get the above exception when it was started in background.
Steps to reproduce :
any updates?
any fix or workaround? @orevial
Ran into the same issue which, for me, renders this package unusable. I would love to have the time to dive in and get to the cause, but I do not and had to move on without using this library. Shame because I do appreciate it's function.
Any updates on this? It's a pretty serious issue
Don't know if it's your problem and can help you, but I found it happens when you pop a route after call show on a flushbar.
So you can either await for it to finish and then pop, or also wrap it in a
Future.delayed(Duration.zero, (){ });
works, so it schedules it right after the pop and doesn't try to pop the flushbar WHILE you are popping the route giving the error.
I regret to inform you that my solution with Future.delayed still doesn't resolve the issue in some instances
Encountered this issue too, are there any updates or workarounds? This is a quite severe issue in an otherwise perfect library.
I also have this issue
This issue is still occurring and crashing my app.
Same here!
same issue
Flushbar is crashing on Flutter 2.10.+
Here is the log:
`Failed assertion: line 5021 pos 12: 'entry.currentState == _RouteLifecycle.popping || (entry.hasPage && entry.currentState.index < _RouteLifecycle.pop.index)': is not true. flutter: #0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)
1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)
2 NavigatorState.finalizeRoute (package:flutter/src/widgets/navigator.dart:5021:12)
3 OverlayRoute.didPop (package:flutter/src/widgets/routes.dart:74:18)
4 FlushbarRoute.didPop (package:another_flushbar/flushbar_route.dart:393:18)
5 _RouteEntry.handlePop (package:flutter/src/widgets/navigator.dart:2896:16)
6 NavigatorState._flushHistoryUpdates (package:flutter/src/widgets/navigator.dart:3860:22)
7 NavigatorState.pop (package:flutter/src/widgets/navigator.dart:4902:7)
8 FlushbarRoute._configureTimer. (package:another_flushbar/flushbar_route.dart:403:22)
9 _rootRun (dart:async/zone.dart:1418:47)
10 _CustomZone.run (dart:async/zone.dart:1328:19)
11 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
12 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
13 _rootRun (dart:async/zone.dart:1426:13)
14 _CustomZone.run (dart:async/zone.dart:1328:19)
15 _CustomZone.bindCallback. (dart:async/zone.dart:1260:23)
16 Timer._createTimer. (dart:async-patch/timer_patch.dart:18:15)
17 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:395:19)
18 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:426:5)
19 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
`