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 Methods
-
cancel(
) → Future< void> - Cancel an ongoing vibration.
-
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. -
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, double sharpness = 0.5, VibrationPreset? preset}) → Future<void> -
Vibrate with
durationatamplitudeorpatternatintensities.