Flutter GetX Navigation

Installation
SKILL.md

GetX Navigation

Priority: P0 (CRITICAL)

Decoupled navigation system allowing UI transitions without BuildContext.

Implementation Guidelines

  • Prefer Named Routes: Use Get.toNamed('/path') for better maintainability. Define routes in a centralized AppPages class.
  • No Context Navigation: Leverage Get.to(), Get.back(), etc., directly from controllers.
  • Navigation Methods:
    • Get.to(): Navigate to next screen.
    • Get.off(): Navigate and replace current screen (e.g., Splash -> Home).
    • Get.offAll(): Clear stack and navigate (e.g., Logout -> Login).
    • Get.back(): Close current screen, dialog, or bottom sheet.
  • Bindings Everywhere: Always link routes with Bindings to manage controller lifecycles.
  • Middleware: Use GetMiddleware for route guards (Auth, Permissions) instead of logic inside views.

Code Example

Installs
–
Repository
ngxtm/devkit
GitHub Stars
8
First Seen
–
Flutter GetX Navigation — ngxtm/devkit