# Flutter Getx Navigation

> Implement context-less navigation, named routes, and middleware using GetX. Use when building navigation with GetX routing in Flutter.

- Skill: `hoangnguyen0403/flutter-getx-navigation` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx skillmds@latest add hoangnguyen0403/flutter-getx-navigation`
- Raw SKILL.md: https://api.skillmd.com/api/skills/hoangnguyen0403/flutter-getx-navigation/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: HoangNguyen0403 (https://skillmd.com/u/hoangnguyen0403)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/hoangnguyen0403/flutter-getx-navigation

---

# GetX Navigation

## **Priority: P0 (CRITICAL)**


## Guidelines

- **Named Routes**: Use `Get.toNamed('/path')`. Define routes in `AppPages`.
- **Navigation APIs**:
 - `Get.to()`: Push new route.
 - `Get.off()`: Replace current route.
 - `Get.offAll()`: Clear stack and push.
 - `Get.back()`: Pop route/dialog/bottomSheet.
- **Bindings**: Link routes with `Bindings` for automated lifecycle.
- **Middleware**: Implement `GetMiddleware` for Auth/Permission guards.

## Code Example

See [AppPages Config](references/app-pages.md) for route definition and controller usage patterns.

## Anti-Patterns

- **Navigator Context**: not use `Navigator.of(context)` with GetX.
- **Hardcoded Routes**: Use `Routes` constant class.
- **Direct Dialogs**: Use `Get.dialog()` and `Get.snackbar()`.

## References

- [AppPages Config](references/app-pages.md)
- [Middleware Implementation](references/middleware-example.md)

## Related Topics

getx-state-management | feature-based-clean-architecture
