double_tap_to_exit 1.0.1 copy "double_tap_to_exit: ^1.0.1" to clipboard
double_tap_to_exit: ^1.0.1 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.1

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.

3
likes
130
pub points
86%
popularity

Publisher

verified publishersivaprasadnk.dev

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on double_tap_to_exit