auto_route_library
auto_route_library copied to clipboard
CustomAutoRouter ignores reverseDurationInMilliseconds
As i understand it, reverseDurationInMilliseconds should effect the animation duration on a "pop" / "back" interaction on the page. Im using it as follows (i essentially want to disable any animation):
@CustomAutoRouter(
replaceInRouteName: 'Page,Route',
transitionsBuilder: TransitionsBuilders.fadeIn,
durationInMilliseconds: 0,
reverseDurationInMilliseconds: 0,
routes: <AutoRoute>[
AutoRoute(
page: HomePageWrapper,
path: '/',
initial: true,
children: [
AutoRoute(path: '', page: HomePage),
AutoRoute(path: 'list', page: ListPage),
AutoRoute(
path: 'settings',
page: SettingsPageWrapper,
children: [
RedirectRoute(path: '', redirectTo: 'user'),
AutoRoute(path: 'user', page: UserSettingsPage),
AutoRoute(path: 'server', page: ServerSettingsPage),
],
),
],
),
AutoRoute(page: LoginPage, path: '/login'),
],
)
class $AppRouter {}
But when i run it in Chrome any "forward" animation is instant, but the reverse animation still persist for a while, looks like the reverseDurationInMilliseconds
property is ignored, even though transitionsBuilder
is given. Even every positive value does not seem to have any effect. Am I missing something, or how can i disable animations on a "back" / "previous page" transition?
@khainke if you don't want any transitions just leave the transitions builder empty in CustomRoute
Happens for me as well. The issue still stands. Users of this library might want an entry animation, but an instant pop.
Many thanks btw, my life is much easier with auto_route
@khainke if you don't want any transitions just leave the transitions builder empty in CustomRoute
This will not change the default reverse transition... (at least for web, back button/navigation in browser will still fade to the last route).
(i tried both specifying null
and not specifying the transitionsBuilder
parameter)
Can confirm this in 3.2.2
.
Even the simplest configuration has a delay on pop. This makes it unusable in Flutter Web...
@CustomAutoRouter(
replaceInRouteName: 'Page,Route',
routes: <AutoRoute>[
AutoRoute(page: FirstPage, initial: true),
AutoRoute(page: SecondPage),
],
)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
if there was no recent changes, then this is still an open issue. (this is a bump, so this issue stays open.)
Pretty sure I'm still witnessing this on latest.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
pretty sure, this is still an issue ...
If you want to disable animations you can use customRoute
with transitionBuilder
:
CustomRoute<void>(
page: YourPage,
transitionsBuilder: TransitionsBuilders.noTransition,
)