Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close the app when pressing back button/doing back gesture on the main screen #395

Merged
merged 2 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/pages/HomePage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class _HomePageState extends State<HomePage> with RouteAware, WidgetsBindingObse
];

return WillPopScope(
onWillPop: () async => false,
onWillPop: () async => true,
child: Stack(children: [
Positioned.fill(
// Do not prevent the scroll down if the submenu is up. Only hide the submenu and keep scrolling...
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/TutorialPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _TutorialPageState extends State<TutorialPage> {
setState(() => _loggingIn = true);
ApiController().getCredentials().then((credentials) {
MainRepository().credentials = credentials!;
Navigator.of(context).pushNamed('/home');
Navigator.of(context).pushNamedAndRemoveUntil('/home', ModalRoute.withName('/'));
}).catchError((error) => onError(error));
})
: slideButton(L.TUTORIAL_NYX,
Expand Down