Closed pauli2406 closed 2 years ago
I also noticed this behavior when using the scaffold.
Interessting is also that flutter recommended method: ModalRoute.of(context)?.canPop
also returns false.
also @pauli2406 please consider using details and syntax highlighting with "dart". Otherwise your issue is just unreadable :pray:
@jlnrrg You are right. Did not know about the language support. Adjusted it.
@pauli2406 I'm not sure if you solved this yet but I ran into a similar issue.
Where you wrote onPressed: tabsRouter.popTop,
, I was able to make it work using the following.
if (tabsRouter.canPopSelfOrChildren) {
final childRouter = context.innerRouterOf(tabsRouter.currentChild!.name);
return BackButton(
onPressed: () => childRouter!.pop(),
);
} else {
return null;
}
Hopefully this is helpful!
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
Hi, I am facing the issue that the auto back button is not working correctly when navigation within a tab of the AutoTabsScaffold. The AutoTabsScaffold is used within the Node Wrapper Page The button is not updated after navigating via
It is only re-rendered when switching tabs. The same happens after using the back button, it stays even if no page is available to pop anymore until tabs are changed.
Any idea how to solve this?
Router
```dart @MaterialAutoRouter( replaceInRouteName: 'Page,Route', routes:Wrapper page
```dart class NodeWrapperPage extends StatefulWidget { const NodeWrapperPage({Key? key}) : super(key: key); @override _NodeWrapperPageState createState() => _NodeWrapperPageState(); } class _NodeWrapperPageState extends StateScreenshots
https://user-images.githubusercontent.com/24795790/120071216-8a1d5800-c08e-11eb-915d-ef58be8bf8b1.png https://user-images.githubusercontent.com/24795790/120071228-96091a00-c08e-11eb-8eb0-8452d8935039.png