This commit is contained in:
Efril
2026-05-14 15:05:04 +07:00
parent c4618bbc1b
commit 96526c1972
4 changed files with 19 additions and 3 deletions
+15 -1
View File
@@ -107,7 +107,20 @@ class _ReportPageState extends State<ReportPage> with TickerProviderStateMixin {
DashboardAnalyticLoaderState
>(
builder: (context, state) {
return CustomScrollView(
return RefreshIndicator(
color: AppColor.primary,
onRefresh: () async {
context.read<DashboardAnalyticLoaderBloc>().add(
DashboardAnalyticLoaderEvent.fetched(),
);
// tunggu sampai fetching selesai
await context
.read<DashboardAnalyticLoaderBloc>()
.stream
.firstWhere((s) => !s.isFetching);
},
child: CustomScrollView(
physics: const AlwaysScrollableScrollPhysics(),
slivers: [
SliverAppBar(
expandedHeight: 120,
@@ -197,6 +210,7 @@ class _ReportPageState extends State<ReportPage> with TickerProviderStateMixin {
),
),
],
),
);
},
),