Skip to content

Commit f222857

Browse files
committed
fix: finish setup not returning to home page
1 parent 9052aae commit f222857

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

lib/database/database.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class BusStopList extends _$BusStopList {
102102
}
103103

104104
Future<void> fetchFromApi() async {
105-
final busStopList = await ref.read(apiBusStopListProvider.future);
105+
final busStopList = await ref.refresh(apiBusStopListProvider.future);
106106

107107
await _cacheBusStops(busStopList);
108108

lib/pages/fetch_data_page.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ class _FetchDataPageState extends ConsumerState<FetchDataPage> {
3030
);
3131
} else {
3232
return FetchDataPage2(
33-
isSetup: widget.isSetup,
34-
onFinish: () {
35-
if (Navigator.canPop(context)) {
36-
Navigator.pop(context);
37-
} else {
38-
SavedRoute().go(context);
39-
}
40-
});
33+
isSetup: widget.isSetup,
34+
onFinish: () {
35+
if (widget.isSetup) {
36+
SavedRoute().go(context);
37+
} else {
38+
Navigator.pop(context);
39+
}
40+
},
41+
);
4142
}
4243
}
4344
}

0 commit comments

Comments
 (0)