fireHaptic function
Implementation
void fireHaptic(HapticLevel level) {
if (!StorageService.to.getBool(StorageKeys.hapticsEnabled, def: true)) {
return;
}
if (StorageService.to.getBool(StorageKeys.hapticSoftMode, def: false)) {
level = _softModeDowngrade(level);
}
switch (level) {
case HapticLevel.light:
HapticFeedback.lightImpact();
case HapticLevel.medium:
HapticFeedback.mediumImpact();
case HapticLevel.heavy:
HapticFeedback.heavyImpact();
}
}