This commit is contained in:
2026-07-11 17:47:40 +02:00
commit 6587779a58
66 changed files with 7325 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
import 'package:go_router/go_router.dart';
import '../views/bar_screen_view.dart';
import '../views/product_form_view.dart';
import '../views/product_list_view.dart';
final appRouter = GoRouter(
initialLocation: '/bar',
routes: [
GoRoute(
path: '/bar',
builder: (context, state) => const BarScreenView(),
),
GoRoute(
path: '/products',
builder: (context, state) => const ProductListView(),
routes: [
GoRoute(
path: 'new',
builder: (context, state) => const ProductFormView(),
),
GoRoute(
path: ':id/edit',
builder: (context, state) {
final productId = state.pathParameters['id']!;
return ProductFormView(productId: productId);
},
),
],
),
],
);