Fixed bugs

This commit is contained in:
2026-08-20 22:02:38 +05:30
parent 5f620022f3
commit fc0faafa18
7 changed files with 198 additions and 22 deletions

View File

@@ -135,7 +135,12 @@ class _DailyRatesScreenState extends ConsumerState<DailyRatesScreen> {
);
}
return ListView.builder(
return RefreshIndicator(
onRefresh: () async {
ref.invalidate(productCategoriesProvider);
await ref.read(productCategoriesProvider.future);
},
child: ListView.builder(
padding: const EdgeInsets.all(16),
itemCount: commodities.length,
itemBuilder: (context, index) {
@@ -314,7 +319,7 @@ class _DailyRatesScreenState extends ConsumerState<DailyRatesScreen> {
),
);
},
);
));
},
loading: () => const Center(child: CircularProgressIndicator()),
error: (err, stack) => Center(child: Text('Error: $err')),