Skip to content

Commit

Permalink
fix: app not closing on the exit dialog (#1369)
Browse files Browse the repository at this point in the history
  • Loading branch information
DGoiana authored Oct 28, 2024
2 parents d5638da + 930e0d7 commit 4259069
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/uni_app/lib/view/home/widgets/exit_app_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:uni/generated/l10n.dart';

/// Manages the app section displayed when the user presses the back button
Expand Down Expand Up @@ -34,9 +35,9 @@ class BackButtonExitWrapper extends StatelessWidget {
child: Text(S.of(context).no),
),
ElevatedButton(
onPressed: () {
onPressed: () async {
userActionCompleter.complete(true);
Navigator.of(context).pop(false);
await SystemNavigator.pop();
},
child: Text(S.of(context).yes),
),
Expand Down

0 comments on commit 4259069

Please sign in to comment.