add detail, fetch products, categories

This commit is contained in:
Phuoc Nguyen
2025-10-15 17:46:50 +07:00
parent 4038f8e8a6
commit 02e5fd4244
12 changed files with 814 additions and 84 deletions

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import '../../domain/entities/category.dart';
import '../pages/category_detail_page.dart';
/// Category card widget
class CategoryCard extends StatelessWidget {
@@ -20,7 +21,13 @@ class CategoryCard extends StatelessWidget {
color: color,
child: InkWell(
onTap: () {
// TODO: Filter products by category
// Navigate to category detail page
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CategoryDetailPage(category: category),
),
);
},
child: Padding(
padding: const EdgeInsets.all(16.0),