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.

Libraries

double_tap_to_exit