Use a `GoRouteData` route with a required constructor parameter. The `go_router_builder` generator maps `orderId` to the `:orderId` segment and makes an untyped navigation call unnecessary. ```dart import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; part 'app_router.g.dart'; @TypedGoRoute<OrderDetailRoute>(path: '/orders/:orderId') class OrderDetailRoute extends GoRouteData { const OrderDetailRoute({required this.orderId}); final String orderId; @override Widget...
Scanned 9/5/2026
Install to Claude Code
npx -y skills add HoangNguyen0403/agent-skills-standard --skill flutter-go-router-navigation --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Flutter Go Router Navigation?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hoangnguyen0403-flutter-go-router-navigation-agent-skills-standard)More formats (shields.io, HTML) on the badges page.
Use a `GoRouteData` route with a required constructor parameter. The `go_router_builder` generator maps `orderId` to the `:orderId` segment and makes an untyped navigation call unnecessary.
```dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
part 'app_router.g.dart';
@TypedGoRoute<OrderDetailRoute>(path: '/orders/:orderId')
class OrderDetailRoute extends GoRouteData {
const OrderDetailRoute({required this.orderId});
final String orderId;
@override
Widget build(BuildContext context, GoRouterState state) {
return OrderDetailScreen(orderId: orderId);
}
}
class OrderDetailScreen extends StatelessWidget {
const OrderDetailScreen({super.key, required this.orderId});
final String orderId;
@override
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(title: const Text('Order details')),
body: Center(child: Text('Order: $orderId')),
);
}
final GoRouter appRouter = GoRouter(routes: $appRoutes);
```
Navigate only through the route type:
```dart
OrderDetailRoute(orderId: order.id).push(context);
// or replace the current location:
OrderDetailRoute(orderId: order.id).go(context);
```
`orderId` cannot be omitted at the call site. Register `appRouter` once in dependency injection and pass it to `MaterialApp.router`; do not construct routers per screen or call `context.go('/orders/...')` with raw paths.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!