Fixed bugs
This commit is contained in:
@@ -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')),
|
||||
|
||||
Reference in New Issue
Block a user