double_tap_to_exit 1.0.3 copy "double_tap_to_exit: ^1.0.3" to clipboard
double_tap_to_exit: ^1.0.3 copied to clipboard

Add double-tap-to-exit functionality to your app using this package !

DoubleTapToExit #

Add double-tapping the back-button to exit functionality to your app using this package !

Getting Started #

Add this to your package's pubspec.yaml file

dependencies:
  double_tap_to_exit: ^1.0.3

Usage #

First, you just have to import the package using:

import 'package:double_tap_to_exit/double_tap_to_exit.dart';

Wrap your Scaffold widget with the DoubleTapToExit widget, passing an optional snackBar:


class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return DoubleTapToExit(
      child: Scaffold(),
      snackBar: const SnackBar(
        content: Text('Tap again to exit !'),
      ),
    );
  }
}

Contributing #

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

7
likes
140
points
777
downloads

Publisher

verified publishersivaprasadnk.dev

Weekly Downloads

Add double-tap-to-exit functionality to your app using this package !

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on double_tap_to_exit