This commit is contained in:
wyf
2025-06-17 19:12:30 +08:00
parent e34966aaba
commit f3f3e4f73f
117 changed files with 5479 additions and 6679 deletions

View File

@@ -125,10 +125,10 @@ class _DeviceShareInfoWidgetState extends State<DeviceShareInfoWidget> {
},
side: BorderSide(
width: 1.5,
color: FlutterFlowTheme.of(context).secondaryText,
color: Colors.white,
),
activeColor: stringToColor("#16C89F"),
checkColor: FlutterFlowTheme.of(context).info,
checkColor: Colors.white,
),
);
}),
@@ -161,14 +161,12 @@ class _DeviceShareInfoWidgetState extends State<DeviceShareInfoWidget> {
alignment: AlignmentDirectional(-1, 0),
child: Text(
"${item['k']}",
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc4,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc4,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
@@ -176,14 +174,12 @@ class _DeviceShareInfoWidgetState extends State<DeviceShareInfoWidget> {
),
Text(
"${item['v']}",
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),

View File

@@ -1,4 +1,3 @@
import 'package:ef/base/widget/flutterflow/FlutterFlowTheme.dart';
import 'package:flutter/material.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
@@ -20,7 +19,6 @@ class DoubleBlueteethDeviceCompoentWidget extends StatefulWidget {
_DoubleBlueteethDeviceCompoentWidgetState();
}
class _DoubleBlueteethDeviceCompoentWidgetState
extends State<DoubleBlueteethDeviceCompoentWidget> {
@override
@@ -57,12 +55,12 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'AITH-V3',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -73,21 +71,21 @@ class _DoubleBlueteethDeviceCompoentWidgetState
children: [
Text(
'信号强度:-36dBm',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
'SN12',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 40.rpx)),
),
@@ -97,12 +95,12 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'蓝牙地址48:CA:43:B1:B3:B2',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -110,12 +108,12 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'mac48CA43B1B3B0',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -126,33 +124,33 @@ class _DoubleBlueteethDeviceCompoentWidgetState
children: [
Text(
'网络:在线',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
'传感器:',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
'可绑定',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFF1AD2B5),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFF1AD2B5),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
@@ -164,29 +162,29 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'版本02409.0301',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
Divider(
thickness: 2.rpx,
color: FlutterFlowTheme.of(context).alternate,
color: Colors.white,
),
Container(
width: double.infinity,
decoration: BoxDecoration(),
child: Text(
'AITH-V3',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -197,21 +195,21 @@ class _DoubleBlueteethDeviceCompoentWidgetState
children: [
Text(
'信号强度:-36dBm',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
'SN12',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 40.rpx)),
),
@@ -221,12 +219,12 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'蓝牙地址48:CA:43:B1:B3:B2',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -234,12 +232,12 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'mac48CA43B1B3B0',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
Container(
@@ -250,33 +248,33 @@ class _DoubleBlueteethDeviceCompoentWidgetState
children: [
Text(
'网络:在线',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
'传感器:',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
'可绑定',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFF1AD2B5),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFF1AD2B5),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
@@ -288,18 +286,17 @@ class _DoubleBlueteethDeviceCompoentWidgetState
decoration: BoxDecoration(),
child: Text(
'版本02409.0301',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
),
].divide(SizedBox(height: 37.rpx)),
),
),
);
}
}

View File

@@ -0,0 +1,575 @@
import 'dart:async';
import 'package:ef/ef.dart';
import 'package:flutter/material.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/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
import 'package:vbvs_app/common/util/requestWithLog.dart';
import 'package:vbvs_app/component/base/GradientSwitch.dart';
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
import 'package:vbvs_app/controller/message/common_message_setting_controller.dart';
import 'package:vbvs_app/controller/message/message_setting_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
class MessageSettingPage extends StatefulWidget {
var data;
MessageSettingPage({super.key, required this.data});
@override
State<MessageSettingPage> createState() => _MessageSettingPageState();
}
class _MessageSettingPageState extends State<MessageSettingPage> {
final ThemeController themeController = Get.find();
MessageSettingController messageSettingController = Get.find();
CommonMessageSettingController commonMessageSettingController = Get.find();
@override
void initState() {
super.initState();
_fetchCommonMessageSetting();
_fetchDeviceMessageSetting();
}
Future<void> _fetchCommonMessageSetting() async {
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.user_setting;
String type = "user_message_setting";
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}?type=$type";
requestWithLog(
logTitle: "查询用户消息配置",
method: MyHttpMethod.get,
queryUrl: queryUrl,
onSuccess: (res) {
if (res.data == null || res.data.isEmpty) {
var data = {
"type": type,
"setting": 1,
"appSetting": 1,
"serviceSetting": 1,
"tipSetting": 1,
"deviceUpgradeSetting": 1,
"deviceIssueSetting": 1,
};
requestWithLog(
logTitle: "更新用户消息配置",
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: data,
onSuccess: (res) {
requestWithLog(
logTitle: "查询用户消息配置",
method: MyHttpMethod.get,
queryUrl: queryUrl,
onSuccess: (res) {
if (res.data != null && res.data.isNotEmpty) {
var datalist = res.data;
commonMessageSettingController.model.setting =
datalist['setting'];
commonMessageSettingController.model.appSetting =
datalist['appSetting'];
commonMessageSettingController.model.serviceSetting =
datalist['serviceSetting'];
commonMessageSettingController.model.tipSetting =
datalist['tipSetting'];
commonMessageSettingController.model.deviceUpgradeSetting =
datalist['deviceUpgradeSetting'];
commonMessageSettingController.model.deviceIssueSetting =
datalist['deviceIssueSetting'];
commonMessageSettingController.updateAll();
}
},
);
//
},
);
} else {
var datalist = res.data;
commonMessageSettingController.model.setting = datalist['setting'];
commonMessageSettingController.model.appSetting =
datalist['appSetting'];
commonMessageSettingController.model.serviceSetting =
datalist['serviceSetting'];
commonMessageSettingController.model.tipSetting =
datalist['tipSetting'];
commonMessageSettingController.model.deviceUpgradeSetting =
datalist['deviceUpgradeSetting'];
commonMessageSettingController.model.deviceIssueSetting =
datalist['deviceIssueSetting'];
commonMessageSettingController.updateAll();
}
},
onFailure: (res) {
print(res);
},
);
}
Future<void> _fetchDeviceMessageSetting() async {
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.user_setting;
String mac = widget.data['mac'];
String type = "user_device_message_setting_$mac";
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}?type=$type";
requestWithLog(
logTitle: "查询用户消息配置",
method: MyHttpMethod.get,
queryUrl: queryUrl,
onSuccess: (res) {
if (res.data == null || res.data.isEmpty) {
var data = {
"type": type,
"setting": 1,
"appSetting": 1,
"serviceSetting": 1,
};
requestWithLog(
logTitle: "更新用户消息配置",
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: data,
onSuccess: (res) {
requestWithLog(
logTitle: "查询用户消息配置",
method: MyHttpMethod.get,
queryUrl: queryUrl,
onSuccess: (res) {
if (res.data != null && res.data.isNotEmpty) {
var datalist = res.data;
messageSettingController.model.setting =
datalist['setting'];
messageSettingController.model.appSetting =
datalist['appSetting'];
messageSettingController.model.serviceSetting =
datalist['serviceSetting'];
messageSettingController.updateAll();
}
},
);
//
},
);
} else {
var datalist = res.data;
messageSettingController.model.setting = datalist['setting'];
messageSettingController.model.appSetting = datalist['appSetting'];
messageSettingController.model.serviceSetting =
datalist['serviceSetting'];
messageSettingController.updateAll();
}
},
onFailure: (res) {
print(res);
},
);
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, bodysize) => GestureDetector(
onTap: () => FocusScope.of(context).unfocus(),
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/img/bgNoImg.png'),
fit: BoxFit.fill,
),
),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
backgroundColor: themeController.currentColor.sc17,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(
color: themeController.currentColor.sc3,
),
titleSpacing: 0,
title: Container(
width: double.infinity,
height: 180.rpx,
child: Stack(
alignment: Alignment.center,
children: [
/// 居中标题
Text(
'消息设置'.tr,
style: TextStyle(
fontFamily: 'ReadexPro',
color: themeController.currentColor.sc3,
letterSpacing: 0,
fontSize: 30.rpx,
),
),
Positioned(
left: 0,
child: returnIconButtomAddCallback(() {}),
),
],
),
),
actions: [],
centerTitle: false,
),
body: GestureDetector(
child: SafeArea(
top: true,
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 0, 0.rpx, 0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Padding(
padding:
EdgeInsetsDirectional.fromSTEB(0, 30.rpx, 0, 0),
child: Container(
width: double.infinity,
constraints: BoxConstraints(
minHeight: 90.rpx,
),
decoration: BoxDecoration(
color: themeController.currentColor.sc5),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 15.rpx, 30.rpx, 15.rpx),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
"消息提醒设置".tr,
style: TextStyle(
color: themeController.currentColor.sc3,
fontSize:
AppConstants().title_text_fontSize),
),
),
Obx(() {
return GradientSwitch(
value: commonMessageSettingController
.model.setting ==
1
? (messageSettingController
.model.setting ==
1
? true
: false)
: false,
onChanged: (val) {
if (commonMessageSettingController
.model.setting ==
0) {
TopSlideNotification.show(context,
text: "请先在设置里的消息通知打开全部消息配置".tr,
textColor: themeController
.currentColor.sc9);
return;
}
String serviceAddress =
ServiceConstant.service_address;
String serviceName =
ServiceConstant.server_service;
String serviceApi =
ServiceConstant.user_setting;
String mac = widget.data['mac'];
String type =
"user_device_message_setting_$mac";
String queryUrl =
"${serviceAddress}${serviceName}${serviceApi}";
var data = {
"type": type,
"setting": val == true ? 1 : 0,
"appSetting": messageSettingController
.model.appSetting,
"serviceSetting":
messageSettingController
.model.serviceSetting,
};
requestWithLog(
logTitle: "更新消息推送状态",
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: data,
onSuccess: (res) {
_fetchDeviceMessageSetting();
messageSettingController
.updateAll();
});
},
activeGradient: LinearGradient(
colors: [
themeController.currentColor.sc1,
themeController.currentColor.sc2
],
),
activeThumbColor: Colors.white,
inactiveThumbColor:
stringToColor("#A2A4A9"),
inactiveColor: stringToColor("#161B28"),
);
}),
],
),
),
),
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 21.rpx, 30.rpx, 0),
child: Container(
decoration: BoxDecoration(
color: themeController.currentColor.sc5,
borderRadius: BorderRadius.circular(
AppConstants().normal_container_radius),
),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 40.rpx, 30.rpx, 54.rpx),
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
"APP消息".tr,
style: TextStyle(
color: themeController
.currentColor.sc3,
fontSize: AppConstants()
.title_text_fontSize),
),
),
Obx(() {
return GradientSwitch(
value: commonMessageSettingController
.model.setting ==
1
? (messageSettingController
.model.setting ==
1
? (messageSettingController
.model
.appSetting ==
1
? true
: false)
: false)
: false,
onChanged: (val) {
if (commonMessageSettingController
.model.setting ==
0) {
TopSlideNotification.show(context,
text:
"请先在设置里的消息通知打开全部消息配置".tr,
textColor: themeController
.currentColor.sc9);
return;
}
if (messageSettingController
.model.setting ==
0) {
TopSlideNotification.show(context,
text: "请先打开消息提醒设置".tr,
textColor: themeController
.currentColor.sc9);
return;
}
String serviceAddress =
ServiceConstant.service_address;
String serviceName =
ServiceConstant.server_service;
String serviceApi =
ServiceConstant.user_setting;
String mac = widget.data['mac'];
String type =
"user_device_message_setting_$mac";
String queryUrl =
"${serviceAddress}${serviceName}${serviceApi}";
var data = {
"type": type,
"setting":
messageSettingController
.model.setting,
"appSetting": val == true ? 1 : 0,
"serviceSetting":
messageSettingController
.model.serviceSetting,
};
requestWithLog(
logTitle: "更新消息推送状态",
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: data,
onSuccess: (res) {
_fetchDeviceMessageSetting();
messageSettingController
.updateAll();
});
},
activeGradient: LinearGradient(
colors: [
themeController.currentColor.sc1,
themeController.currentColor.sc2
],
),
activeThumbColor: Colors.white,
inactiveThumbColor:
stringToColor("#A2A4A9"),
inactiveColor:
stringToColor("#161B28"),
);
}),
],
),
Text(
"APP消息介绍".tr,
style: TextStyle(
color: themeController.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize),
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
"服务号消息".tr,
style: TextStyle(
color: themeController
.currentColor.sc3,
fontSize: AppConstants()
.title_text_fontSize),
),
),
Obx(() {
return GradientSwitch(
value: commonMessageSettingController
.model.setting ==
1
? (messageSettingController
.model.setting ==
1
? (messageSettingController
.model
.serviceSetting ==
1
? true
: false)
: false)
: false,
onChanged: (val) {
if (commonMessageSettingController
.model.setting ==
0) {
TopSlideNotification.show(context,
text:
"请先在设置里的消息通知打开全部消息配置".tr,
textColor: themeController
.currentColor.sc9);
return;
}
if (messageSettingController
.model.setting ==
0) {
TopSlideNotification.show(context,
text: "请先打开消息提醒设置".tr,
textColor: themeController
.currentColor.sc9);
return;
}
String serviceAddress =
ServiceConstant.service_address;
String serviceName =
ServiceConstant.server_service;
String serviceApi =
ServiceConstant.user_setting;
String mac = widget.data['mac'];
String type =
"user_device_message_setting_$mac";
String queryUrl =
"${serviceAddress}${serviceName}${serviceApi}";
var data = {
"type": type,
"setting":
messageSettingController
.model.setting,
"appSetting":
messageSettingController
.model.appSetting,
"serviceSetting":
val == true ? 1 : 0,
};
requestWithLog(
logTitle: "更新消息推送状态",
method: MyHttpMethod.put,
queryUrl: queryUrl,
data: data,
onSuccess: (res) {
_fetchDeviceMessageSetting();
messageSettingController
.updateAll();
});
},
activeGradient: LinearGradient(
colors: [
themeController.currentColor.sc1,
themeController.currentColor.sc2
],
),
activeThumbColor: Colors.white,
inactiveThumbColor:
stringToColor("#A2A4A9"),
inactiveColor:
stringToColor("#161B28"),
);
}),
],
),
Text(
"服务号消息介绍".tr,
style: TextStyle(
color: themeController.currentColor.sc4,
fontSize: AppConstants()
.normal_text_fontSize),
),
].divide(SizedBox(
height: 49.rpx,
)),
),
),
),
),
),
],
),
),
),
),
),
),
),
);
}
}

View File

@@ -110,7 +110,6 @@ class _SingleBlueteethDeviceCompoentWidgetState
}
},
onCancel: () {
print('用户点击了取消');
blueteethBindController.currentDeviceMac.value = "";
blueteethBindController.updateAll();
@@ -140,12 +139,12 @@ class _SingleBlueteethDeviceCompoentWidgetState
children: [
Text(
device.name ?? '蓝牙绑定.默认设备名称'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
),
Obx(() {
if (blueteethBindController.currentDeviceMac.value ==
@@ -169,77 +168,77 @@ class _SingleBlueteethDeviceCompoentWidgetState
children: [
Text(
"蓝牙绑定.信号强度".tr + '${device.rssi ?? '-'}dBm',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
SizedBox(width: 40.rpx),
Text(
"蓝牙绑定.SN".tr + '${device.sn ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
Text(
"蓝牙绑定.蓝牙地址".tr + '${device.deviceId ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
"蓝牙绑定.mac".tr + '${device.mac ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Row(
children: [
Text(
"蓝牙绑定.网络".tr +
'${device.isOnline == true ? '蓝牙绑定.在线'.tr : '蓝牙绑定.离线'.tr}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
SizedBox(width: 145.rpx),
Row(
children: [
Text(
"蓝牙绑定.传感器".tr + "",
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
device.bind == false ? '蓝牙绑定.可绑定'.tr : '蓝牙绑定.已被绑定'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: device.bind == false
? const Color(0xFF1AD2B5)
: themeController.currentColor.sc9,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: device.bind == false
? const Color(0xFF1AD2B5)
: themeController.currentColor.sc9,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
@@ -247,12 +246,12 @@ class _SingleBlueteethDeviceCompoentWidgetState
),
Text(
"版本".tr + '${device.version ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
].divide(SizedBox(height: 37.rpx)),
),
@@ -292,7 +291,7 @@ class _SingleBlueteethDeviceCompoentWidgetState
return;
} else {}
}
TopSlideNotification.show(context,text: "双人版绑定修复中");
TopSlideNotification.show(context, text: "双人版绑定修复中");
print('选中了设备索引:$selectedIndex');
//配置wifi
},
@@ -354,12 +353,12 @@ class _SingleBlueteethDeviceCompoentWidgetState
children: [
Text(
device.name ?? '蓝牙绑定.默认设备名称'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 30.rpx,
letterSpacing: 0.0,
),
),
Obx(() {
if (blueteethBindController.currentDeviceMac.value ==
@@ -382,77 +381,77 @@ class _SingleBlueteethDeviceCompoentWidgetState
children: [
Text(
"蓝牙绑定.信号强度".tr + '${device.rssi ?? '-'}dBm',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
SizedBox(width: 40.rpx),
Text(
"蓝牙绑定.SN".tr + '${device.sn ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF5F9FD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
Text(
"蓝牙绑定.蓝牙地址".tr + '${device.deviceId ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
"蓝牙绑定.mac".tr + '${device.mac ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Row(
children: [
Text(
"蓝牙绑定.网络".tr +
'${device.isOnline == true ? '蓝牙绑定.在线'.tr : '蓝牙绑定.离线'.tr}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
SizedBox(width: 145.rpx),
Row(
children: [
Text(
"蓝牙绑定.传感器".tr + "",
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFEBF2F8),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
Text(
device.bind == false ? '蓝牙绑定.可绑定'.tr : '蓝牙绑定.已被绑定'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: device.bind == false
? const Color(0xFF1AD2B5)
: themeController.currentColor.sc9,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: device.bind == false
? const Color(0xFF1AD2B5)
: themeController.currentColor.sc9,
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
],
),
@@ -460,12 +459,12 @@ class _SingleBlueteethDeviceCompoentWidgetState
),
Text(
"版本".tr + '${device.version ?? '-'}',
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
style: TextStyle(
fontFamily: 'Inter',
color: const Color(0xFFF6FAFD),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
),
].divide(SizedBox(
height: 37.rpx,

View File

@@ -53,15 +53,16 @@ void showBindDoubleDialog(
Align(
alignment: AlignmentDirectional(0, 0),
child: Padding(
padding: EdgeInsetsDirectional.fromSTEB(0.rpx, 93.rpx, 0, 0),
padding:
EdgeInsetsDirectional.fromSTEB(0.rpx, 93.rpx, 0, 0),
child: Text(
'蓝牙绑定.双人版绑定标题'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
@@ -114,16 +115,20 @@ void showBindDoubleDialog(
// 确定按钮
Padding(
padding: EdgeInsetsDirectional.fromSTEB(60.rpx, 100.rpx, 60.rpx, 0),
padding: EdgeInsetsDirectional.fromSTEB(
60.rpx, 100.rpx, 60.rpx, 0),
child: _buildActionButton(
context,
text: '蓝牙绑定.确定'.tr,
onTap: () {
Get.back();
int selectedIndex = blueteethBindController.model.deviceIndex0!
? 0
: (blueteethBindController.model.deviceIndex1! ? 1 : 2);
int selectedIndex =
blueteethBindController.model.deviceIndex0!
? 0
: (blueteethBindController.model.deviceIndex1!
? 1
: 2);
onConfirm(selectedIndex);
},
@@ -131,7 +136,8 @@ void showBindDoubleDialog(
),
// 取消按钮
Padding(
padding: EdgeInsetsDirectional.fromSTEB(60.rpx, 19.rpx, 60.rpx, 60.rpx),
padding: EdgeInsetsDirectional.fromSTEB(
60.rpx, 19.rpx, 60.rpx, 60.rpx),
child: _buildActionButton(
context,
text: '蓝牙绑定.取消'.tr,
@@ -150,7 +156,6 @@ void showBindDoubleDialog(
);
}
Future<void> showHaveBindDialog(BuildContext context) async {
ThemeController themeController = Get.find();
@@ -182,12 +187,12 @@ Future<void> showHaveBindDialog(BuildContext context) async {
0.rpx, 93.rpx, 0.rpx, 0.rpx),
child: Text(
'蓝牙绑定.无法绑定'.tr,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
@@ -244,14 +249,12 @@ Future<void> showHaveBindDialog(BuildContext context) async {
children: [
Text(
'蓝牙绑定.知道了'.tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(
width: 17.rpx,
@@ -299,7 +302,7 @@ void showLoadingDialog(BuildContext context, {String? title}) {
// 0.rpx, 93.rpx, 0.rpx, 0.rpx),
// child: Text(
// '蓝牙绑定.无法绑定'.tr,
// style: FlutterFlowTheme.of(context).bodyMedium.override(
// style: TextStyle(
// fontFamily: 'Inter',
// fontSize: 30.rpx,
// letterSpacing: 0.0,
@@ -382,12 +385,12 @@ Widget _buildCheckboxRow(
children: [
TextSpan(
text: mainText,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: AppConstants().normal_text_fontSize,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
letterSpacing: 0.0,
fontSize: AppConstants().normal_text_fontSize,
color: themeController.currentColor.sc3,
),
),
if (isBindable)
TextSpan(
@@ -453,12 +456,12 @@ Widget _buildActionButton(
children: [
Text(
text,
style: FlutterFlowTheme.of(context).bodyMedium.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -534,12 +537,12 @@ void showConfirmDialog(
33.rpx, 60.rpx, 33.rpx, 33.rpx),
child: Text(
title,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
@@ -577,15 +580,13 @@ void showConfirmDialog(
children: [
Text(
"蓝牙绑定.否".tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -615,15 +616,13 @@ void showConfirmDialog(
children: [
Text(
"蓝牙绑定.是".tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -713,12 +712,12 @@ void showSingleConfirmDialog(
33.rpx, 60.rpx, 33.rpx, 33.rpx),
child: Text(
title,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
@@ -757,15 +756,12 @@ void showSingleConfirmDialog(
children: [
Text(
confirmText,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -848,12 +844,12 @@ void showWifiDialog(
EdgeInsetsDirectional.fromSTEB(0.rpx, 40.rpx, 0, 0),
child: Text(
title,
style: FlutterFlowTheme.of(context).bodyMedium.override(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController.currentColor.sc3,
),
),
),
),
@@ -895,15 +891,12 @@ void showWifiDialog(
children: [
Text(
"蓝牙绑定.连接".tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize:
AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -984,14 +977,12 @@ Future<void> showTipDialog(
children: [
Text(
'蓝牙绑定.知道了'.tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -1073,14 +1064,12 @@ Future<void> showUnBindTipDialog(
children: [
Text(
'继续'.tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),
@@ -1119,14 +1108,12 @@ Future<void> showUnBindTipDialog(
children: [
Text(
'下次再说'.tr,
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
style: TextStyle(
color: themeController.currentColor.sc3,
fontFamily: 'Inter',
fontSize: AppConstants().normal_text_fontSize,
letterSpacing: 0.0,
),
),
].divide(SizedBox(width: 17.rpx)),
),