product
This commit is contained in:
@@ -6,8 +6,8 @@ library;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:worker/features/home/domain/entities/promotion.dart';
|
||||
import 'package:worker/features/main/presentation/pages/main_scaffold.dart';
|
||||
import 'package:worker/features/products/presentation/pages/product_detail_page.dart';
|
||||
import 'package:worker/features/products/presentation/pages/products_page.dart';
|
||||
import 'package:worker/features/promotions/presentation/pages/promotion_detail_page.dart';
|
||||
|
||||
@@ -47,6 +47,19 @@ class AppRouter {
|
||||
),
|
||||
),
|
||||
|
||||
// Product Detail Route
|
||||
GoRoute(
|
||||
path: RouteNames.productDetail,
|
||||
name: RouteNames.productDetail,
|
||||
pageBuilder: (context, state) {
|
||||
final productId = state.pathParameters['id'];
|
||||
return MaterialPage(
|
||||
key: state.pageKey,
|
||||
child: ProductDetailPage(productId: productId ?? ''),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Promotion Detail Route
|
||||
GoRoute(
|
||||
path: RouteNames.promotionDetail,
|
||||
|
||||
Reference in New Issue
Block a user