flutter_smart_exit 1.0.0
flutter_smart_exit: ^1.0.0 copied to clipboard
A lightweight, fully-customizable Flutter widget that intercepts the Android back button and provides multiple elegant exit options. With a single wrapper widget, you can prevent accidental app exits [...]
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
1.0.0 - 2025-12-01 #
Added #
- Initial release of the
flutter_smart_exitpackage. FlutterSmartExitwidget to handle smart exit behaviors in Flutter apps:- Back Press Exit: Exits the app when the back button is pressed twice within 2 seconds.
- Popup Exit: Displays an alert dialog asking the user to confirm exit.
- Bottom Sheet Exit: Displays a modal bottom sheet asking the user to confirm exit.
- Customizable UI options:
exitMessageandexitMessageStylefor messages.cancelButtonText,exitButtonText, and their respective styles and button styles.backgroundColorfor dialogs, bottom sheets, and snackbars.bottomSheetHeightfor custom bottom sheet height.
- Automatically handles back press counting and timer reset.
- SnackBar support for user-friendly back press notifications.
- Responsive and adaptive layout for different screen sizes.
Fixed #
- N/A (first release)
Notes #
- Ensure to wrap your app with a
MaterialApporCupertinoAppwhen using this widget. - Works with Flutter's
SystemNavigator.pop()to exit the app. - All dialogs, snackbars, and bottom sheets are fully customizable.