mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-14 01:58:29 +08:00
24 lines
386 B
Dart
24 lines
386 B
Dart
import 'package:flutter/services.dart';
|
|
|
|
abstract class HapticFeedbackUtil {
|
|
static bool enabled = true;
|
|
|
|
static void selection() {
|
|
if (enabled) {
|
|
HapticFeedback.selectionClick();
|
|
}
|
|
}
|
|
|
|
static void light() {
|
|
if (enabled) {
|
|
HapticFeedback.lightImpact();
|
|
}
|
|
}
|
|
|
|
static void heavy() {
|
|
if (enabled) {
|
|
HapticFeedback.heavyImpact();
|
|
}
|
|
}
|
|
}
|