Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 450 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 450 Bytes

shake

A flutter package to detect phone shakes.

To listen to phone shake:

ShakeDetector detector = ShakeDetector.autoStart(
    onPhoneShake: () {
        // Do stuff on phone shake
    }
);

OR

ShakeDetector detector = ShakeDetector.waitForStart(
    onPhoneShake: () {
        // Do stuff on phone shake
    }
);

detector.startListening();

To stop listening:

detector.stopListening();