0 purchases
double tap to exit
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
copied to clipboard
Usage #
First, you just have to import the package using:
import 'package:double_tap_to_exit/double_tap_to_exit.dart';
copied to clipboard
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 !'),
),
);
}
}
copied to clipboard
Contributing #
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.