Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:ui';
|
|||||||
|
|
||||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
|
import 'package:vbvs_app/enum/APPPackageType.dart';
|
||||||
|
|
||||||
class AppConstants {
|
class AppConstants {
|
||||||
// App-related constants
|
// App-related constants
|
||||||
@@ -46,5 +47,6 @@ class AppConstants {
|
|||||||
];
|
];
|
||||||
|
|
||||||
//系统参数
|
//系统参数
|
||||||
int ent_type = 1;//1.默认太和 2.欢睡
|
//运行打包APP模式
|
||||||
|
int ent_type = APPPackageType.TH.code;//1.默认太和 2.欢睡 3.眠花糖
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,31 +26,35 @@ class DailyLogUtils {
|
|||||||
|
|
||||||
// 写入 info 日志(原 writeLog 保留)
|
// 写入 info 日志(原 writeLog 保留)
|
||||||
static Future<void> writeLog(String content) async {
|
static Future<void> writeLog(String content) async {
|
||||||
|
print("[dailylog-->info] $content]");
|
||||||
await _writeLogWithLevel('INFO', content);
|
await _writeLogWithLevel('INFO', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入 warning 日志
|
// 写入 warning 日志
|
||||||
static Future<void> writeWarning(String content) async {
|
static Future<void> writeWarning(String content) async {
|
||||||
|
print("[dailylog-->waring] $content]");
|
||||||
await _writeLogWithLevel('WARNING', content);
|
await _writeLogWithLevel('WARNING', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入 error 日志
|
// 写入 error 日志
|
||||||
static Future<void> writeError(String content) async {
|
static Future<void> writeError(String content) async {
|
||||||
|
print("[dailylog-->error] $content]");
|
||||||
await _writeLogWithLevel('ERROR', content);
|
await _writeLogWithLevel('ERROR', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 写入 debug 日志
|
// 写入 debug 日志
|
||||||
static Future<void> writeDebug(String content) async {
|
static Future<void> writeDebug(String content) async {
|
||||||
|
print("[dailylog-->debug] $content]");
|
||||||
await _writeLogWithLevel('DEBUG', content);
|
await _writeLogWithLevel('DEBUG', content);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future<void> printLog(String content) async {
|
static Future<void> printLog(String content) async {
|
||||||
print("logger--->"+content);
|
print("logger--->" + content);
|
||||||
// await writeLog(content);
|
// await writeLog(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 读取当天日志
|
// 读取当天日志
|
||||||
static Future<String> readTodayLog() async {
|
static Future<String> readTodayLog() async {
|
||||||
final file = await _getLogFile();
|
final file = await _getLogFile();
|
||||||
return await file.readAsString();
|
return await file.readAsString();
|
||||||
}
|
}
|
||||||
|
|||||||
11
lib/enum/APPPackageType.dart
Normal file
11
lib/enum/APPPackageType.dart
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
enum APPPackageType {
|
||||||
|
TH(1, '太和'),
|
||||||
|
HUANSHUI(2, '欢睡'),
|
||||||
|
MHT(3, '眠花糖'),
|
||||||
|
;
|
||||||
|
|
||||||
|
final int code;
|
||||||
|
final String description;
|
||||||
|
|
||||||
|
const APPPackageType(this.code, this.description);
|
||||||
|
}
|
||||||
@@ -12,7 +12,6 @@ import 'package:fluwx/fluwx.dart';
|
|||||||
import 'package:get_storage/get_storage.dart';
|
import 'package:get_storage/get_storage.dart';
|
||||||
import 'package:localstorage/localstorage.dart';
|
import 'package:localstorage/localstorage.dart';
|
||||||
import 'package:syncfusion_localizations/syncfusion_localizations.dart';
|
import 'package:syncfusion_localizations/syncfusion_localizations.dart';
|
||||||
import 'package:vbvs_app/common/color/AppGlobal.dart';
|
|
||||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||||
import 'package:vbvs_app/common/util/CheckNetwork.dart';
|
import 'package:vbvs_app/common/util/CheckNetwork.dart';
|
||||||
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
import 'package:vbvs_app/common/util/CommonVariables.dart';
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
|
import 'package:ef/ef.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
import 'package:vbvs_app/pages/common/bezier_bottom_navigation_bar.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
import 'package:vbvs_app/pages/mh_page/MattressControl.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/homepage/mht_sleep_report_page.dart';
|
import 'package:vbvs_app/pages/mh_page/homepage/mht_sleep_report_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
import 'package:vbvs_app/pages/mh_page/homepage/new_Home_page.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
import 'package:vbvs_app/pages/mh_page/new_mine_page.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
||||||
|
|
||||||
class MainPageBBottomChange extends StatefulWidget {
|
class MainPageBBottomChange extends StatefulWidget {
|
||||||
// 全局 key,用于静态访问 _HomePageState
|
// 全局 key,用于静态访问 _HomePageState
|
||||||
static final GlobalKey<_HomePageState> globalKey = GlobalKey<_HomePageState>();
|
static final GlobalKey<_HomePageState> globalKey =
|
||||||
|
GlobalKey<_HomePageState>();
|
||||||
|
|
||||||
MainPageBBottomChange({Key? key}) : super(key: globalKey);
|
MainPageBBottomChange({Key? key}) : super(key: globalKey);
|
||||||
|
|
||||||
// 静态方法:外部调用,跳转 tab
|
// 静态方法:外部调用,跳转 tab
|
||||||
static void jumpTo(int index) {
|
static void jumpTo(int index) {
|
||||||
@@ -23,7 +26,6 @@ class MainPageBBottomChange extends StatefulWidget {
|
|||||||
_HomePageState createState() => _HomePageState();
|
_HomePageState createState() => _HomePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class _HomePageState extends State<MainPageBBottomChange>
|
class _HomePageState extends State<MainPageBBottomChange>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
int selectedIndex = 0;
|
int selectedIndex = 0;
|
||||||
@@ -68,6 +70,7 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
|
|
||||||
void _onTabTapped(int index) {
|
void _onTabTapped(int index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
dealWebSource(index);
|
||||||
final begin = currentPosition;
|
final begin = currentPosition;
|
||||||
final end = index.toDouble();
|
final end = index.toDouble();
|
||||||
_positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
_positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
||||||
@@ -110,21 +113,31 @@ class _HomePageState extends State<MainPageBBottomChange>
|
|||||||
}
|
}
|
||||||
|
|
||||||
void switchTab(int index) {
|
void switchTab(int index) {
|
||||||
final begin = currentPosition;
|
final begin = currentPosition;
|
||||||
final end = index.toDouble();
|
final end = index.toDouble();
|
||||||
|
|
||||||
_positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
_positionAnimation = Tween<double>(begin: begin, end: end).animate(
|
||||||
CurvedAnimation(parent: _controller, curve: Curves.easeOut),
|
CurvedAnimation(parent: _controller, curve: Curves.easeOut),
|
||||||
)..addListener(() {
|
)..addListener(() {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
});
|
||||||
|
|
||||||
|
_controller.forward(from: 0.0);
|
||||||
|
currentPosition = end;
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
selectedIndex = index;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
_controller.forward(from: 0.0);
|
|
||||||
currentPosition = end;
|
Future<void> dealWebSource(int index) async {
|
||||||
|
WebviewTestController webviewTestController = Get.find();
|
||||||
setState(() {
|
if (index == 2) {
|
||||||
selectedIndex = index;
|
await webviewTestController.web.jsbridge?.dart
|
||||||
});
|
.pageActive();
|
||||||
}
|
}else{
|
||||||
|
await webviewTestController.web.jsbridge?.dart
|
||||||
|
.pageInActive();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
|||||||
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
|
import 'package:vbvs_app/controller/mh_controller/device_list_controller.dart';
|
||||||
import 'package:vbvs_app/model/api_response.dart';
|
import 'package:vbvs_app/model/api_response.dart';
|
||||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
||||||
|
|
||||||
class BluetoothPage extends GetView {
|
class BluetoothPage extends GetView {
|
||||||
Map data;
|
Map data;
|
||||||
@@ -177,6 +178,16 @@ class BluetoothPage extends GetView {
|
|||||||
.unbindDevice(data);
|
.unbindDevice(data);
|
||||||
await deviceListController
|
await deviceListController
|
||||||
.getDeviceList();
|
.getDeviceList();
|
||||||
|
try {
|
||||||
|
WebviewTestController
|
||||||
|
webviewTestController =
|
||||||
|
Get.find();
|
||||||
|
webviewTestController
|
||||||
|
.web.jsbridge?.dart
|
||||||
|
.unBindDevice();
|
||||||
|
} catch (e) {
|
||||||
|
ef.log("[h5]通知列表更新报错:$e");
|
||||||
|
}
|
||||||
Get.toNamed("/mianPageBottomChange");
|
Get.toNamed("/mianPageBottomChange");
|
||||||
// 执行解绑逻辑
|
// 执行解绑逻辑
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ import 'package:vbvs_app/model/api_response.dart';
|
|||||||
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
import 'package:vbvs_app/pages/mh_page/component/mht_bind_dialog.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
|
||||||
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
|
||||||
|
import 'package:vbvs_app/pages/mh_page/test/WebviewTestModel.dart';
|
||||||
|
|
||||||
class DeviceComponentWidget extends StatefulWidget {
|
class DeviceComponentWidget extends StatefulWidget {
|
||||||
BlueToothDataModel bleDevice;
|
BlueToothDataModel bleDevice;
|
||||||
@@ -36,6 +38,7 @@ class DeviceComponentWidget extends StatefulWidget {
|
|||||||
class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
||||||
ThemeController themeController = Get.find();
|
ThemeController themeController = Get.find();
|
||||||
MHTBlueToothController blueteethBindController = Get.find();
|
MHTBlueToothController blueteethBindController = Get.find();
|
||||||
|
MHTHomeController homeController = Get.find();
|
||||||
var lisObj;
|
var lisObj;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -172,7 +175,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
borderRadius: 16.rpx,
|
borderRadius: 16.rpx,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
try {
|
try {
|
||||||
// 连接前暂停扫描
|
//连接前暂停扫描
|
||||||
blueteethBindController.pauseScanning();
|
blueteethBindController.pauseScanning();
|
||||||
if (blueteethBindController.currentDeviceMac?.value !=
|
if (blueteethBindController.currentDeviceMac?.value !=
|
||||||
null &&
|
null &&
|
||||||
@@ -225,6 +228,40 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
TopSlideNotification.show(context,
|
TopSlideNotification.show(context,
|
||||||
text: response.msg!);
|
text: response.msg!);
|
||||||
if (response.code == HttpStatusCodes.ok) {
|
if (response.code == HttpStatusCodes.ok) {
|
||||||
|
try {
|
||||||
|
WebviewTestController webviewTestController =
|
||||||
|
Get.find();
|
||||||
|
webviewTestController.web.jsbridge?.dart
|
||||||
|
.unBindDevice();
|
||||||
|
} catch (e) {
|
||||||
|
ef.log("[h5]通知列表更新报错:$e");
|
||||||
|
}
|
||||||
|
homeController.getPersonList();
|
||||||
|
//请求绑定设备列表
|
||||||
|
// homeController.getSleepReport();
|
||||||
|
homeController.getDeviceNum().then((apiResponse) {
|
||||||
|
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||||
|
TopSlideNotification.show(
|
||||||
|
Get.context!,
|
||||||
|
text: apiResponse.msg!,
|
||||||
|
textColor: themeController.currentColor.sc9,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
homeController
|
||||||
|
.getDeviceList(group: 'room')
|
||||||
|
.then((apiResponse) {
|
||||||
|
if (apiResponse.code != HttpStatusCodes.ok) {
|
||||||
|
TopSlideNotification.show(
|
||||||
|
Get.context!,
|
||||||
|
text: apiResponse.msg!,
|
||||||
|
textColor: themeController.currentColor.sc9,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
//请求睡眠报告
|
||||||
|
// deviceController.getSleepReport();
|
||||||
|
}
|
||||||
|
});
|
||||||
//更新设备绑定流程
|
//更新设备绑定流程
|
||||||
Get.toNamed("/mHTwifiPage",
|
Get.toNamed("/mHTwifiPage",
|
||||||
arguments: widget.bleDevice);
|
arguments: widget.bleDevice);
|
||||||
@@ -242,6 +279,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
textColor: themeController.currentColor.sc9,
|
textColor: themeController.currentColor.sc9,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
blueteethBindController.resumeScanning();
|
||||||
},
|
},
|
||||||
onCancel: () {
|
onCancel: () {
|
||||||
print('用户点击了取消');
|
print('用户点击了取消');
|
||||||
@@ -262,10 +300,11 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
DailyLogUtils.writeLog("连接异常: $e");
|
DailyLogUtils.writeLog("连接异常: $e");
|
||||||
} finally {
|
} finally {
|
||||||
// 确保在任何情况下都恢复扫描
|
// 确保在任何情况下都恢复扫描
|
||||||
if (blueteethBindController
|
// if (blueteethBindController
|
||||||
.currentDeviceMac.value.isEmpty) {
|
// .currentDeviceMac.value.isEmpty) {
|
||||||
blueteethBindController.resumeScanning();
|
// blueteethBindController.resumeScanning();
|
||||||
}
|
// }
|
||||||
|
blueteethBindController.resumeScanning();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colors: [stringToColor("1592AA"), stringToColor("006FA3")],
|
colors: [stringToColor("1592AA"), stringToColor("006FA3")],
|
||||||
@@ -452,7 +491,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
try {
|
try {
|
||||||
// 连接设备
|
// 连接设备
|
||||||
THapp bledevice = THapp(device: device.scanResult.device);
|
THapp bledevice = THapp(device: device.scanResult.device);
|
||||||
await bledevice.connect();
|
await bledevice.connect();
|
||||||
var res2 = bledevice.isConnected;
|
var res2 = bledevice.isConnected;
|
||||||
|
|
||||||
if (!res2) {
|
if (!res2) {
|
||||||
@@ -468,7 +507,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
|
|||||||
|
|
||||||
blueteethBindController.blueConnectFlag.value = 2;
|
blueteethBindController.blueConnectFlag.value = 2;
|
||||||
blueteethBindController.currentDevice = bledevice;
|
blueteethBindController.currentDevice = bledevice;
|
||||||
|
await Future.delayed(Duration(seconds: 1));
|
||||||
var read = bledevice.getresource('fff0/fff1');
|
var read = bledevice.getresource('fff0/fff1');
|
||||||
await read!.characteristic.setNotifyValue(true);
|
await read!.characteristic.setNotifyValue(true);
|
||||||
var write = bledevice.getresource('fff0/fff2');
|
var write = bledevice.getresource('fff0/fff2');
|
||||||
|
|||||||
@@ -601,6 +601,11 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
|||||||
Obx(() {
|
Obx(() {
|
||||||
if (mhtBlueToothController
|
if (mhtBlueToothController
|
||||||
.model.deviceDataStatus!.isNotEmpty) {
|
.model.deviceDataStatus!.isNotEmpty) {
|
||||||
|
final sortedList = mhtBlueToothController
|
||||||
|
.model.deviceDataStatus!
|
||||||
|
.toList()
|
||||||
|
..sort((a, b) => b.scanResult.rssi
|
||||||
|
.compareTo(a.scanResult.rssi));
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
@@ -608,8 +613,7 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
...mhtBlueToothController
|
...sortedList
|
||||||
.model.deviceDataStatus!
|
|
||||||
.map((device) {
|
.map((device) {
|
||||||
return DeviceComponentWidget(
|
return DeviceComponentWidget(
|
||||||
bleDevice: device,
|
bleDevice: device,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:flutter_svg/svg.dart';
|
|||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
import 'package:vbvs_app/common/color/ServiceConstant.dart';
|
||||||
import 'package:vbvs_app/common/color/appConstants.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/FitTool.dart';
|
||||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||||
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
import 'package:vbvs_app/common/util/requestWithLog.dart';
|
||||||
@@ -66,10 +67,12 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
blueteethBindController.updateAll();
|
blueteethBindController.updateAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_isDisposed = true;
|
_isDisposed = true;
|
||||||
_cleanupResources();
|
_cleanupResources();
|
||||||
|
_disconnectDevice();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1097,4 +1100,14 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
|
|||||||
onFailure: (res) {},
|
onFailure: (res) {},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _disconnectDevice() async {
|
||||||
|
try {
|
||||||
|
THapp bledevice = THapp(device: widget.deviceInfo.scanResult.device);
|
||||||
|
await bledevice.disconnect();
|
||||||
|
DailyLogUtils.writeLog("关闭蓝牙连接成功");
|
||||||
|
} catch (e) {
|
||||||
|
DailyLogUtils.writeError("关闭蓝牙连接失败: $e");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'package:ef/ef.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||||
import 'package:vbvs_app/common/color/appConstants.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/FitTool.dart';
|
||||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||||
@@ -80,18 +81,17 @@ class _HomeDeviceStausWidgetState extends State<HomeDeviceStausWidget> {
|
|||||||
WebviewTestController webviewTestController = Get.find();
|
WebviewTestController webviewTestController = Get.find();
|
||||||
var future = webviewTestController.web.jsbridge?.dart
|
var future = webviewTestController.web.jsbridge?.dart
|
||||||
.appToHtmlDevice(device);
|
.appToHtmlDevice(device);
|
||||||
|
Future.delayed(Duration(seconds: 5), () {
|
||||||
Future.delayed(Duration(seconds: 5), () {
|
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
await future;
|
||||||
await future;
|
await webviewTestController.web.jsbridge?.dart
|
||||||
|
.pageActive();
|
||||||
MainPageBBottomChange.jumpTo(2);
|
MainPageBBottomChange.jumpTo(2);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("发生异常: $e");
|
DailyLogUtils.writeError("发生异常: $e");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
colors:
|
colors:
|
||||||
AppConstants().mhtButtongradientColors, // 你原本没有渐变,单色即可
|
AppConstants().mhtButtongradientColors, // 你原本没有渐变,单色即可
|
||||||
enableGradient: true, // 关闭渐变
|
enableGradient: true, // 关闭渐变
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ class _NewSleepReportPageState extends State<NewSleepReportPage> {
|
|||||||
if (widget.data['arrow'] == null ||
|
if (widget.data['arrow'] == null ||
|
||||||
widget.data['arrow'] == true)
|
widget.data['arrow'] == true)
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 20,
|
left: 0,
|
||||||
child: returnIconButtomNew,
|
child: returnIconButtomNew,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user