mirror of
https://github.com/Livinglist/Hacki.git
synced 2025-08-26 03:02:13 +08:00
18 lines
296 B
Dart
18 lines
296 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();
|
|
}
|
|
}
|
|
}
|