Flutter Navigation
ASecurityUse nested navigation so each tab has its own back stack, and keep the tab container stateful. With `go_router`, the usual fix is `StatefulShellRoute.indexedStack`. That preserves each tab’s navigation history and lets back behave inside the active tab first instead of exiting immediately. Expected behavior: - If the current tab has inner pages, back pops within that tab. - If you are on a root page of a non-default tab, back can switch to the default tab. - Only exit when already at the root...
- 584 stars
- 0 votes
- 0 copies
- 5 views
- Added September 5, 2026
Security analysis
100/100Pro scans all 12 files and shows the line behind each finding
npx -y skills add HoangNguyen0403/agent-skills-standard --skill flutter-navigation --agent claude-codeAre you the author of Flutter Navigation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-flutter-navigation-bb281a09)Use nested navigation so each tab has its own back stack, and keep the tab container stateful.
With `go_router`, the usual fix is `StatefulShellRoute.indexedStack`. That preserves each tab’s navigation history and lets back behave inside the active tab first instead of exiting immediately.
Expected behavior:
- If the current tab has inner pages, back pops within that tab.
- If you are on a root page of a non-default tab, back can switch to the default tab.
- Only exit when already at the root of the default tab.
Implementation notes:
- Model tabs as branches in a `StatefulShellRoute`.
- Do not manually manage tab state if the router can preserve it.
- If needed, intercept system back on tab root and redirect to the default tab instead of closing the app.
Files in this skill
- eval-1.baseline.md
- eval-1.with-skill.md
- eval-2.baseline.md
- eval-2.with-skill.md
- eval-3.baseline.md
- eval-3.with-skill.md
- trigger-1.md
- trigger-2.md
- trigger-3.md
- trigger-4.md
- trigger-5.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.