feat: vibration

This commit is contained in:
guozhigq
2023-07-26 15:31:42 +08:00
parent 54d003fdb1
commit 5349015776
22 changed files with 139 additions and 27 deletions

12
lib/utils/feed_back.dart Normal file
View File

@ -0,0 +1,12 @@
import 'package:flutter/services.dart';
import 'package:hive/hive.dart';
import 'package:pilipala/utils/storage.dart';
Box setting = GStrorage.setting;
void feedBack() {
// 设置中是否开启
bool enable = setting.get(SettingBoxKey.feedBackEnable, defaultValue: false);
if (enable) {
HapticFeedback.lightImpact();
}
}