runable
This commit is contained in:
@@ -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: [
|
||||
|
||||
Reference in New Issue
Block a user