This commit is contained in:
2025-10-10 22:49:05 +07:00
parent 02941e2234
commit 38c16bf0b9
49 changed files with 2702 additions and 740 deletions

View File

@@ -27,7 +27,7 @@ class _ProductsPageState extends ConsumerState<ProductsPage> {
// Get filtered products from the provider
final filteredProducts = productsAsync.when(
data: (products) => products,
data: (paginationState) => paginationState.products,
loading: () => <Product>[],
error: (_, __) => <Product>[],
);
@@ -170,8 +170,8 @@ class _ProductsPageState extends ConsumerState<ProductsPage> {
),
body: RefreshIndicator(
onRefresh: () async {
await ref.refresh(productsProvider.future);
await ref.refresh(categoriesProvider.future);
ref.read(productsProvider.notifier).refresh();
ref.read(categoriesProvider.notifier).refresh();
},
child: Column(
children: [