更新安卓通知栏提示

This commit is contained in:
wyf
2025-09-11 09:38:14 +08:00
parent 2c0b911aeb
commit 0bb50226c2
56 changed files with 1431 additions and 488 deletions

View File

@@ -172,24 +172,29 @@ class _BlueteethDevicePageState extends State<BlueteethDevicePage> {
}
// 显示权限被拒绝的提示
// void _showPermissionDeniedDialog(BuildContext context) {
// showDialog(
// context: context,
// builder: (BuildContext context) {
// return AlertDialog(
// title: Text("权限提示".tr),
// content: Text("应用需要蓝牙和位置权限才能扫描设备。请授予权限。".tr),
// actions: [
// TextButton(
// onPressed: () {
// Navigator.of(context).pop();
// },
// child: Text("确定".tr),
// ),
// ],
// );
// },
// );
// }
void _showPermissionDeniedDialog(BuildContext context) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("权限提示".tr),
content: Text("应用需要蓝牙和位置权限才能扫描设备。请授予权限。".tr),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text("确定".tr),
),
],
);
},
);
TopSlideNotification.show(context,
text: "应用需要蓝牙和位置权限才能扫描设备。请授予权限。".tr,
textColor: themeController.currentColor.sc9);
}
// 开始扫描蓝牙设备