Skip to content

Commit

Permalink
fix: finish setup not returning to home page
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffsieu committed Oct 29, 2024
1 parent 9052aae commit f222857
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/database/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class BusStopList extends _$BusStopList {
}

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

await _cacheBusStops(busStopList);

Expand Down
17 changes: 9 additions & 8 deletions lib/pages/fetch_data_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ class _FetchDataPageState extends ConsumerState<FetchDataPage> {
);
} else {
return FetchDataPage2(
isSetup: widget.isSetup,
onFinish: () {
if (Navigator.canPop(context)) {
Navigator.pop(context);
} else {
SavedRoute().go(context);
}
});
isSetup: widget.isSetup,
onFinish: () {
if (widget.isSetup) {
SavedRoute().go(context);
} else {
Navigator.pop(context);
}
},
);
}
}
}
Expand Down

0 comments on commit f222857

Please sign in to comment.