vgv-navigation
Navigation
Routing and navigation best practices for Flutter applications using GoRouter, the Flutter team's recommended routing package built on the Navigator 2.0 API.
Core Standards
Apply these standards to ALL navigation work:
- Use
package:go_routerfor all navigation — never raw Navigator 2.0 or Navigator 1.0 push/pop - Use
@TypedGoRouteannotations for type-safe routes — never raw string paths in route definitions - Prefer
go()overpush()— usepush()only when expecting return data from the destination - Never use the
extraparameter — it breaks deep linking and does not work on the web - Hierarchical sub-routes for proper back navigation — structure routes as parent-child trees, not flat lists
- Hyphens for URL word separation — never underscores or camelCase in URL paths
- Navigate by route name, not raw path strings — use named route navigation to decouple from path changes
- Use
BuildContextextensions for navigation — prefercontext.goNamed()overGoRouter.of(context).goNamed()
Route Organization
More from verygoodopensource/vgv-ai-flutter-plugin
vgv-accessibility
Flutter accessibility auditing and remediation with WCAG 2.1 level selection (A, AA, AAA) across mobile, desktop, and web platforms. Begins by asking the WCAG conformance level and target platform(s) before applying level-appropriate, platform-aware criteria.
3vgv-bloc
Best practices for Bloc state management in Flutter/Dart. Use when writing, modifying, or reviewing code that uses package:bloc, package:flutter_bloc, or package:bloc_test.
2vgv-ui-package
Best practices for building a Flutter UI package on top of Material — custom components, ThemeExtension-based theming, consistent APIs, and widget tests. Use when user says "create a ui package". Supports app_ui_package template.
2vgv-testing
Best practices for Dart unit tests, Flutter widget tests, and golden file tests. Use when writing, modifying, or reviewing tests that use package:test, package:flutter_test, package:mocktail, or package:bloc_test.
2vgv-static-security
>
2vgv-layered-architecture
Best practices for VGV layered monorepo architecture in Flutter. Use when structuring a multi-package Flutter app, creating data or repository packages, defining layer boundaries, or wiring dependencies between packages.
2