Skip to content

Commit

Permalink
SystemNavigator.pop() async
Browse files Browse the repository at this point in the history
  • Loading branch information
peucastro committed Oct 27, 2024
1 parent d76e43c commit f92ae09
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/uni_app/lib/view/home/widgets/exit_app_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ class BackButtonExitWrapper extends StatelessWidget {
child: Text(S.of(context).no),
),
ElevatedButton(
onPressed: () {
onPressed: () async {
userActionCompleter.complete(true);
SystemChannels.platform
.invokeMethod<void>('SystemNavigator.pop');
await SystemNavigator.pop();
},
child: Text(S.of(context).yes),
),
Expand Down

0 comments on commit f92ae09

Please sign in to comment.