Skip to content

Commit

Permalink
Make the listener async
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosNihelton committed Oct 27, 2023
1 parent 9b98d19 commit e26a0b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gui/packages/ubuntupro/lib/pages/startup/startup_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ class _StartupAnimatedChildState extends State<StartupAnimatedChild> {
super.initState();
final model = context.read<StartupModel>();
model.init();
model.addListener(() {
model.addListener(() async {
if (model.view == ViewState.ok) {
Navigator.of(context).pushReplacementNamed(widget.nextRoute);
await Navigator.of(context).pushReplacementNamed(widget.nextRoute);
}
if (model.view == ViewState.retry) {
model.resetAgent();
await model.resetAgent();
}
});
}
Expand Down

0 comments on commit e26a0b5

Please sign in to comment.