hasCustomVibrationsSupport method

Future<bool> hasCustomVibrationsSupport()

Whether the device can play a custom waveform.

This is the check that matters for Morse: when it is false the motor can only be switched on for a fixed duration, so the timing that carries the message cannot be reproduced. Fall back to showing HapticModel.morseCode rather than playing something illegible.

Unlike hasVibrator this asks the platform directly, so it is meaningful on emulators. It may return true on a device with no motor.

Implementation

Future<bool> hasCustomVibrationsSupport() =>
    Vibration.hasCustomVibrationsSupport();