FlutterShakePlugin class

Constructors

FlutterShakePlugin({@required PhoneShakeCallback onPhoneShaken, int shakeTimeMS: 500, double shakeThresholdGravity: 3.25, bool shouldVibrate: true, int vibrateDuration: 500 })
This constructor waits until startListening is called

Properties

onPhoneShaken PhoneShakeCallback
callback for phone shake
final
shakeThresholdGravity double
Shake detection threshold
final
shakeTimeMS int
Minimum time between shake
final
shouldVibrate bool
if do vibration when phone shakes
final
streamSubscription StreamSubscription
StreamSubscription for Accelerometer events
read / write
vibrateDuration int
vibration duration
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

startListening() → void
Starts listening to accerelometer events
stopListening() → void
Stops listening to accelerometer events
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited