> 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)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/flutter-getx-navigation?format=md"GetX Navigation
Priority: P0 (CRITICAL)
Decoupled navigation system allowing UI transitions without BuildContext.
Guidelines
- Named Routes: Use
Get.toNamed('/path'). Define routes inAppPages. - 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
Bindingsfor automated lifecycle. - Middleware: Implement
GetMiddlewarefor 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
Routesconstant class. - Direct Dialogs: Use
Get.dialog()andGet.snackbar().
References
Related Topics
getx-state-management | feature-based-clean-architecture
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)