shake_event

Last updated:

0 purchases

shake_event Image
shake_event Images
Add to Cart

Description:

shake event

shake_event #
A cross-platform shake event listener for Flutter applications.
Installation #
First, add shake_event as a dependency in your pubspec.yaml file.
dependencies:
shake_event: ^0.0.9
copied to clipboard
Example #
import 'package:shake_event/shake_event.dart';

...
class _MyStatefulWidgetState extends State<HomeStatefulWidget> with ShakeHandler {
@override
void initState() {
startListeningShake(20); //20 is the default threshold value for the shake event
super.initState();
}

@override
void dispose() {
resetShakeListeners();
super.dispose();
}

@override
shakeEventListener() {
//DO ACTIONS HERE
return super.shakeEventListener();
}

...
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.