flutter_smart_exit 1.2.0 copy "flutter_smart_exit: ^1.2.0" to clipboard
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.1.0 - 2025-12-02 #

Fixed #

  • BottomSheet Alignment and Radius problem

1.0.0 - 2025-12-01 #

Added #

  • Initial release of the flutter_smart_exit package.
  • FlutterSmartExit widget 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:
    • exitMessage and exitMessageStyle for messages.
    • cancelButtonText, exitButtonText, and their respective styles and button styles.
    • backgroundColor for dialogs, bottom sheets, and snackbars.
    • bottomSheetHeight for 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 MaterialApp or CupertinoApp when using this widget.
  • Works with Flutter's SystemNavigator.pop() to exit the app.
  • All dialogs, snackbars, and bottom sheets are fully customizable.
3
likes
160
points
19
downloads

Publisher

verified publisherraihansikdar.com

Weekly Downloads

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.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_smart_exit