Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this blog,we will learn How to implement double back to close app? A flutter package that allows Android users to press back -button twice to close the app.
This feature is very useful for any application.So,without wasting time,Let’s begin the code implementation.
Check our Flutter app development page.
Add the following package in your pubspec.yaml file.Using this package we will implement double back to close app.
Also run flutter pub get command.
Import the library of the package that you have added in your pubspec.yaml file.
Now,Inside Scaffold that wraps all your widgets,place the DoubleBack widget by passing a message.
And it’s done.We have implemented double back to close app. Let’s check the output.
Output is shown in the below attached video.
As you can see in the below attached video that when i am pressing back button, i am getting toast message.Then again i am pressing back button twice the application become close.
Congratulations!!!! you have learned How to implement double back to close app?.
For more interesting blogs check out here – https://mobikul.com/blog/
Hope this blog helped you with a better understanding of the implemention of double back to close app in Flutter.
Thanks for reading.😇
https://pub.dev/packages/double_back_to_close
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Name
Email
Subject
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.