VibrationUtil class

震动工具类

提供了用于控制设备振动的方法,例如振动控制

If you think the HapticFeedback vibration effect provided by Flutter native is not awesome, we recommend you use the vibration third-party library to achieve it.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

vibrate({int duration = defaultVibrationDuration}) → void
根据指定时长触发设备振动反馈
vibrateOnEdge(double value) → void
边界振动反馈,带有防抖机制

Constants

defaultMinVibrationInterval → const int
最小防抖间隔(毫秒)
defaultVibrationDuration → const int
默认振动时长(毫秒)