棉花app新增页面
This commit is contained in:
618
lib/pages/device_control/new_settingPage.dart
Normal file
618
lib/pages/device_control/new_settingPage.dart
Normal file
@@ -0,0 +1,618 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.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/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
||||
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
||||
|
||||
class SettingPage extends StatefulWidget {
|
||||
@override
|
||||
_SettingPageState createState() => _SettingPageState();
|
||||
}
|
||||
|
||||
class _SettingPageState extends State<SettingPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return LayoutBuilder(builder: (context, bodySize) {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusScope.of(context).unfocus(),
|
||||
child: Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/new_background.png'), // 本地图片
|
||||
fit: BoxFit.fill, // 填满整个 Container
|
||||
),
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.transparent,
|
||||
iconTheme: const IconThemeData(color: Colors.white),
|
||||
titleSpacing: 0,
|
||||
automaticallyImplyLeading: false,
|
||||
title: SizedBox(
|
||||
width: double.infinity,
|
||||
height: 180.rpx,
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
// 中间居中的标题
|
||||
Text(
|
||||
'设置',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
// 左侧图标
|
||||
Positioned(
|
||||
left: 20.rpx,
|
||||
child: returnIconButtomNew,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
),
|
||||
body: SafeArea(
|
||||
top: true,
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(30.rpx, 0, 30.rpx, 0),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 25.rpx, 0.rpx, 0),
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF003058),
|
||||
borderRadius: BorderRadius.circular(
|
||||
AppConstants().normal_container_radius),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0, 0.rpx, 0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text('修改密码',
|
||||
style: TextStyle(
|
||||
fontSize: 30.rpx,
|
||||
color: Colors.white,
|
||||
height: 1)),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height: 15
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
// Row(
|
||||
// mainAxisSize: MainAxisSize.max,
|
||||
// children: [
|
||||
// Text(
|
||||
// '深色',
|
||||
// style: FlutterFlowTheme.of(
|
||||
// context)
|
||||
// .bodyMedium
|
||||
// .override(
|
||||
// fontFamily: 'Inter',
|
||||
// color:
|
||||
// Color(0xFFD9E3EB),
|
||||
// fontSize: 26.rpx,
|
||||
// letterSpacing: 0.0,
|
||||
// ),
|
||||
// ),
|
||||
|
||||
// ].divide(SizedBox(width: 28.rpx)),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
print('点击了容器');
|
||||
Get.toNamed("/aboutUsPage");
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 30.rpx, 40.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'当前版本',
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
Text('SWES3.513.4',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 26.rpx,
|
||||
height: 1)),
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height: 14
|
||||
// .rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
// TopSlideNotification.show(context,
|
||||
// text: "待开发功能".tr);
|
||||
Get.toNamed("/languagePage");
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'切换语言',
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Obx(() {
|
||||
return Text(
|
||||
languageController
|
||||
.selectLanguage
|
||||
.value!
|
||||
.language_name!,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color:
|
||||
Color(0xFFD9E3EB),
|
||||
fontSize: 26.rpx,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
||||
// SvgPicture.asset(
|
||||
// 'assets/img/icon/arrow_right.svg',
|
||||
// width: 8.rpx,
|
||||
// height: 15
|
||||
// .rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
// color: themeController
|
||||
// .currentColor.sc3,
|
||||
// ),
|
||||
].divide(SizedBox(width: 28.rpx)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
print('点击了容器');
|
||||
Get.toNamed("/aboutUsPage");
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 30.rpx, 40.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'设置页.关于我们'.tr,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height: 14
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 0.rpx, 40.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 30.rpx, 0.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'设置页.用户协议'.tr,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height: 15
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ClickableContainer(
|
||||
backgroundColor:
|
||||
Colors.transparent, // 容器背景色
|
||||
highlightColor: themeController
|
||||
.currentColor.sc21, // 点击时的背景色
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0.rpx),
|
||||
onTap: () {
|
||||
TopSlideNotification.show(context,
|
||||
text: "待开发功能".tr);
|
||||
},
|
||||
child: Container(
|
||||
child: Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
40.rpx, 30.rpx, 40.rpx, 30.rpx),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Text(
|
||||
'设置页.隐私协议'.tr,
|
||||
style: FlutterFlowTheme.of(
|
||||
context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
fontFamily: 'Inter',
|
||||
color: Colors.white,
|
||||
fontSize: AppConstants()
|
||||
.title_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
lineHeight: 1.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(width: 22.rpx)),
|
||||
),
|
||||
SvgPicture.asset(
|
||||
'assets/img/icon/arrow_right.svg',
|
||||
width: 8.rpx,
|
||||
height: 14
|
||||
.rpx, // 如果 SVG 中没有固定颜色,可以这样设置
|
||||
color: themeController
|
||||
.currentColor.sc3,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]
|
||||
.divide(SizedBox(height: 0.rpx))
|
||||
.addToStart(SizedBox(height: 30.rpx))
|
||||
.addToEnd(SizedBox(height: 30.rpx)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 174.rpx, 0.rpx, 0),
|
||||
child: CustomCard(
|
||||
borderRadius: 16.rpx,
|
||||
|
||||
// 圆角半径
|
||||
onTap: () {
|
||||
// ApiResponse apiResponse =
|
||||
// userInfoController.logOut();
|
||||
// TopSlideNotification.show(
|
||||
// context,
|
||||
// text: apiResponse.msg!,
|
||||
// textColor:
|
||||
// apiResponse.code == HttpStatusCodes.ok
|
||||
// ? themeController.currentColor.sc2
|
||||
// : themeController.currentColor.sc9,
|
||||
// );
|
||||
// if (apiResponse.code == HttpStatusCodes.ok) {
|
||||
// Get.offAllNamed("/mianPageBottomChange");
|
||||
// }
|
||||
},
|
||||
colors: [
|
||||
Color(0XFF84F5FF),
|
||||
], // 渐变色是同一个色,也可以根据需要调整
|
||||
child: Container(
|
||||
width:
|
||||
// MediaQuery.sizeOf(context).width * 0.66,
|
||||
bodySize.maxWidth,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'设置页.退出登录'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: Color(0xFF003058),
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 17.rpx,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
100.rpx, 20.rpx, 100.rpx, 0),
|
||||
child: CustomCard(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
onTap: () {
|
||||
TopSlideNotification.show(
|
||||
context,
|
||||
text: "待开发功能".tr,
|
||||
);
|
||||
},
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
], // 渐变色是同一个色,也可以根据需要调整
|
||||
child: Container(
|
||||
width:
|
||||
// MediaQuery.sizeOf(context).width * 0.66,
|
||||
bodySize.maxWidth,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'设置页.注销账号'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color:
|
||||
themeController.currentColor.sc9,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.normal_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
width: 17.rpx,
|
||||
)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 135.rpx, 0.rpx, 0),
|
||||
child: ClickableContainer(
|
||||
borderRadius:
|
||||
AppConstants().button_container_radius, // 圆角半径
|
||||
onTap: () {},
|
||||
backgroundColor:
|
||||
Colors.transparent, // 渐变色是同一个色,也可以根据需要调整
|
||||
highlightColor: themeController.currentColor.sc5,
|
||||
padding: EdgeInsetsDirectional.fromSTEB(
|
||||
0.rpx, 0.rpx, 0.rpx, 0),
|
||||
child: Container(
|
||||
width:
|
||||
// MediaQuery.sizeOf(context).width * 0.66,
|
||||
bodySize.maxWidth,
|
||||
height: MediaQuery.sizeOf(context).height * 0.055,
|
||||
constraints: BoxConstraints(
|
||||
minWidth: 500.rpx,
|
||||
minHeight: 90.rpx,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'ICP备案号:浙ICP备2023000785号-1'.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.smaller_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Copyright © 202-2025 嘉兴太和信息技术有限责任公司 版权所有'
|
||||
.tr,
|
||||
style: FlutterFlowTheme.of(context)
|
||||
.bodyMedium
|
||||
.override(
|
||||
color: themeController
|
||||
.currentColor.sc4,
|
||||
fontFamily: 'Inter',
|
||||
fontSize: AppConstants()
|
||||
.smaller_text_fontSize,
|
||||
letterSpacing: 0.0,
|
||||
),
|
||||
),
|
||||
].divide(SizedBox(
|
||||
height: 17.rpx,
|
||||
))),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user