vibrateText method
Future<void>
vibrateText(
- String text, {
- HapticMorse morse = const HapticMorse(),
- int amplitude = -1,
- double sharpness = 0.5,
Converts text to Morse and plays it.
Pass morse to override the timings or alphabet. Returns without
touching the motor when text contains nothing encodable.
amplitude is the motor strength from 1 to 255 where supported, or -1
for the device default. sharpness is iOS only.
Implementation
Future<void> vibrateText(
String text, {
HapticMorse morse = const HapticMorse(),
int amplitude = -1,
double sharpness = 0.5,
}) =>
vibrateEvents(
morse.convertTextToHapticEvents(text),
amplitude: amplitude,
sharpness: sharpness,
);