This commit is contained in:
Phuoc Nguyen
2025-10-24 15:09:51 +07:00
parent 338d26a38a
commit c225144ad3
11 changed files with 1805 additions and 173 deletions

View File

@@ -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,