flutter_smart_exit 1.2.0
flutter_smart_exit: ^1.2.0 copied to clipboard
A customizable Flutter widget that smartly handles Android back presses, preventing accidental exits with options like double-back to exit, dialogs, bottom sheets, or snack bars.
Changelog #
1.2.0 - 2025-12-03 #
Added #
- exitImageContainerHeight
- exitImageContainerWidth
- exitImageContainerDecoration
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.