更新安卓通知栏提示
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
@@ -23,6 +24,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/model/BleDeviceData.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
|
||||
class AfterWifiPagePerson extends StatefulWidget {
|
||||
var type;
|
||||
@@ -118,24 +120,24 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
return SizedBox(
|
||||
width: 24.rpx,
|
||||
height: 24.rpx,
|
||||
child:CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (blueteethBindController.netType.value == 0) {
|
||||
return SizedBox(
|
||||
width: 24.rpx,
|
||||
height: 24.rpx,
|
||||
child:CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (blueteethBindController.wifiConnectStatus.value ==
|
||||
@@ -143,12 +145,12 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
return SizedBox(
|
||||
width: 24.rpx,
|
||||
height: 24.rpx,
|
||||
child:CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
@@ -638,12 +640,16 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
width: 32.rpx,
|
||||
height: 32.rpx,
|
||||
child:
|
||||
CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
themeController.currentColor.sc1,
|
||||
),
|
||||
),
|
||||
CircularProgressIndicator(
|
||||
strokeWidth: 2,
|
||||
valueColor:
|
||||
AlwaysStoppedAnimation<
|
||||
Color>(
|
||||
themeController
|
||||
.currentColor
|
||||
.sc1,
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
getWifiIconByRsso(
|
||||
@@ -835,6 +841,8 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -980,6 +988,8 @@ class _AfterWifiPagePersonState extends State<AfterWifiPagePerson> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
if (onData.status == BleEventType.ready) {
|
||||
aa = await getDeviceNetVersion(
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
// 开始扫描蓝牙设备
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
@@ -23,6 +24,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/model/BleDeviceData.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
|
||||
class WifiPage extends StatefulWidget {
|
||||
var type; //为空,首次绑定 不为空,从设备列表进入
|
||||
@@ -64,6 +66,8 @@ class _WifiPageState extends State<WifiPage> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
if (onData.status == BleEventType.ready) {
|
||||
aa = await getDeviceNetVersion(
|
||||
@@ -880,6 +884,8 @@ class _WifiPageState extends State<WifiPage> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
// if (onData.status == BleEventType.ready) {
|
||||
// // showLoadingDialog(context, title: "获取wifi列表中...".tr);
|
||||
@@ -965,7 +971,7 @@ class _WifiPageState extends State<WifiPage> {
|
||||
decoration: BoxDecoration(shape: BoxShape.circle),
|
||||
child: Image.asset("assets/img/wifi3.png"),
|
||||
);
|
||||
} else if (rssi >=AppConstants().wifi3) {
|
||||
} else if (rssi >= AppConstants().wifi3) {
|
||||
return Container(
|
||||
width: 40.rpx,
|
||||
height: 40.rpx,
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||
import 'package:vbvs_app/common/color/appConstants.dart';
|
||||
import 'package:vbvs_app/common/util/DailyLogUtils.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||
@@ -23,6 +24,7 @@ import 'package:vbvs_app/controller/user_info_controller.dart';
|
||||
import 'package:vbvs_app/model/BleDeviceData.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/blueteeth_device_page.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as edm;
|
||||
|
||||
class WifiPagePerson extends StatefulWidget {
|
||||
var type;
|
||||
@@ -835,6 +837,8 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -980,6 +984,8 @@ class _WifiPagePersonState extends State<WifiPagePerson> {
|
||||
if (onData.status == BleEventType.recvLineLog) {
|
||||
final line = onData.val;
|
||||
print("[bleee]:" + line);
|
||||
edm.EasyDartModule.logger.info("[bleee]:" + line);
|
||||
DailyLogUtils.writeLog("[bleee]:" + line);
|
||||
}
|
||||
if (onData.status == BleEventType.ready) {
|
||||
aa = await getDeviceNetVersion(
|
||||
|
||||
Reference in New Issue
Block a user