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

Add Double-back Exit on Homepage #76

Closed
infiniteoverflow opened this issue Mar 18, 2021 · 8 comments · Fixed by #82
Closed

Add Double-back Exit on Homepage #76

infiniteoverflow opened this issue Mar 18, 2021 · 8 comments · Fixed by #82
Assignees
Labels
enhancement New feature or request GSSOC21 Level2 bug fixes, small features

Comments

@infiniteoverflow
Copy link
Owner

We need to override the back button and implement the "Double-back to Exit" feature.

You can use this package : https://pub.dev/packages/double_back_to_close_app

@infiniteoverflow infiniteoverflow added the enhancement New feature or request label Mar 18, 2021
@D-Ajay-Kumar
Copy link
Contributor

Can do it.

@anotherwebguy
Copy link
Contributor

We need to override the back button and implement the "Double-back to Exit" feature.

You can use this package : https://pub.dev/packages/double_back_to_close_app

I can work on this issue @infiniteoverflow

@infiniteoverflow
Copy link
Owner Author

I am sorry @anotherwebguy , Since @D-Ajay-Kumar has commented on this issue first , it will be assigned to him. Do look out for more issues or feel free to raise an issue of your own.

@D-Ajay-Kumar
Copy link
Contributor

On it

@D-Ajay-Kumar
Copy link
Contributor

The double back exit is working but it's taking user to the login screen again where there's an alert dialog that says "Login complete enjoy the app". Should it be like that? This alert dialog seems kinda useless coz why would anyone want to see a dialog box after logging in to confirm the login has been successful, not to mention it doesn't occur after logging in, only when double back is pressed on home screen.

@D-Ajay-Kumar
Copy link
Contributor

And this is happening coz after logging in there is a navigator that pushes the home screen on top of the login screen because of which the user can press the back button and go to this login screen again without pressing the logout button. There should instead be a push replacement so that the back button closes the app. And when the logout button is pressed, this home screen should be replaced with the login screen again.

@infiniteoverflow
Copy link
Owner Author

@D-Ajay-Kumar use SystemNavigator.pop() to close the app. Dont perform navigation to the login screen. That is something that we dont need in the app.
Once a person double clicks back button , the app should close.

@D-Ajay-Kumar
Copy link
Contributor

Done. Please check the code :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GSSOC21 Level2 bug fixes, small features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants