double_back_to_exit 1.0.1 copy "double_back_to_exit: ^1.0.1" to clipboard
double_back_to_exit: ^1.0.1 copied to clipboard

A Flutter package that provides a widget to implement a double back press to close functionality in Flutter applications. Works seamlessly on Android and iOS platforms without any conflicts with web.

double_back_to_exit #

Pub

A Flutter package that provides a widget to implement the double back press to exit functionality in your app.

Features #

  • Implements the double back press to exit functionality.
  • Works on both Android and iOS.
  • Customizable snackbar message.
  • Customizable duration between back presses.

Getting started #

In your Flutter project, add the double_back_to_exit dependency to your pubspec.yaml file:

dependencies: 
  double_back_to_exit: ^1.0.0

Usage #

Import the package in your Dart file:

import 'package:double_back_to_exit/double_back_to_exit.dart';

Wrap your main widget with the DoubleBackToExitWidget:

DoubleBackToExitWidget( 
  snackBarMessage: 'Press back again to exit', 
  child: MaterialApp( 
    // Your app content here 
  ), 
)

Example #

For a complete example, see the example folder.

Additional information #

For more information, check out the documentation.

If you find any issues or would like to contribute, please visit the GitHub repository.

License #

This package is licensed under the MIT License.

4
likes
0
pub points
78%
popularity

Publisher

unverified uploader

A Flutter package that provides a widget to implement a double back press to close functionality in Flutter applications. Works seamlessly on Android and iOS platforms without any conflicts with web.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on double_back_to_exit