Vibration class
Platform-independent vibration methods.
Constructors
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 Properties
- deviceInfo → DeviceInfoPlugin
-
final
Static Methods
-
cancel(
) → Future< void> - This method is used to cancel an ongoing vibration. iOS: only works for custom haptic vibrations using `CHHapticEngine.
-
hasAmplitudeControl(
) → Future< bool?> - Check if the vibrator has amplitude control.
-
hasCustomVibrationsSupport(
) → Future< bool?> -
Check if the device is able to vibrate with a custom
duration
,pattern
orintensities
. May returntrue
even if the device has no vibrator. -
hasVibrator(
) → Future< bool?> - Check if vibrator is available on device.
-
vibrate(
{int duration = 500, List< int> pattern = const [], int repeat = -1, List<int> intensities = const [], int amplitude = -1}) → Future<void> -
Vibrate with
duration
atamplitude
orpattern
atintensities
.