agentsclimarketplace

Flutter getx navigation

Skill ComeOnOliver/skillshub/skills/HoangNguyen0403/agent-skills-standard/flutter-getx-navigation

Context-less navigation, named routes, and middleware using GetX. Use when implementing navigation or route middleware with GetX in Flutter. (triggers: **/app_pages.dart, **/app_routes.dart, GetPage, Get.to, Get.off, Get.offAll, Get.toNamed, GetMiddleware)From its SKILL.md

Install
npx -y skills add ComeOnOliver/skillshub --skill flutter-getx-navigation

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.5 KB, 300 tokens by cl100k_base, as published. Nobody here has run it

GetX Navigation

Priority: P0 (CRITICAL)

Decoupled navigation system allowing UI transitions without BuildContext.

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

static final routes = [
  GetPage(
    name: _Paths.HOME,
    page: () => HomeView(),
    binding: HomeBinding(),
    middlewares: [AuthMiddleware()],
  ),
];

// Usage in Controller
void logout() => Get.offAllNamed(Routes.LOGIN);

Anti-Patterns

  • Navigator Context: Do not use Navigator.of(context) with GetX.
  • Hardcoded Routes: Use a Routes constant class.
  • Direct Dialogs: Use Get.dialog() and Get.snackbar().

References

Related Topics

getx-state-management | feature-based-clean-architecture

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.