This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
Navigating programmatically to a parent route from a sub-route of type NoTransition
throws an Exception
#205
Labels
It's a coincidence that
NoTransition
was just introduced and yesterday I was struggling to debug the following error that I later found out it was caused by usingtransitionDuration: Duration.zero
in certain sub-routes.To Reproduce:
profile
home
Additional Context:
The error will not occur if
profile
was a top level route. So it seems the error would occur when a sub-route of typeNoTransition
is navigating programmatically to its parent route.When I was debugging, the error occurred in all of iOS, macOS, and Web using
Flutter: (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64)
Work Around
A simple fix for me was to place the smallest transition duration possible and apparently a
1-µs
does the trick.Though I'm not sure if there's something can be done on the
go_router
side to makeDurration.zero
work. When researching, the error seems to be common with Navigator 1.0 and the Scaffold Drawer where most solutions were adding an arbitraryFuture.delay
orpostframeCallbacks
.The text was updated successfully, but these errors were encountered: