177 lines
7.4 KiB
Dart
177 lines
7.4 KiB
Dart
import 'package:ef/ef.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
|
import 'package:vbvs_app/common/color/appConstants.dart';
|
|
import 'package:vbvs_app/common/color/app_uri_status.dart';
|
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
|
import 'package:vbvs_app/component/tool/CustomCard.dart';
|
|
import 'package:vbvs_app/component/tool/NewTopSlideNotification.dart';
|
|
import 'package:vbvs_app/component/tool/TopSlideNotification.dart';
|
|
import 'package:vbvs_app/controller/mh_controller/mh_language_controller.dart';
|
|
import 'package:vbvs_app/controller/user_info_controller.dart';
|
|
import 'package:vbvs_app/model/api_response.dart';
|
|
|
|
class DeviceMaintain extends StatefulWidget {
|
|
@override
|
|
_DeviceMaintainState createState() => _DeviceMaintainState();
|
|
}
|
|
|
|
class _DeviceMaintainState extends State<DeviceMaintain> {
|
|
MHLanguageController languageController = Get.find();
|
|
UserInfoController userInfoController = Get.find();
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@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(
|
|
'设备维护'.tr,
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(
|
|
color: Colors.white,
|
|
fontSize: 30.rpx,
|
|
),
|
|
),
|
|
// 左侧图标
|
|
Positioned(
|
|
left: 0.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, 0.rpx, 0.rpx, 0),
|
|
child: CustomCard(
|
|
borderRadius: 16.rpx,
|
|
onTap: () {
|
|
Get.toNamed("/deviceUpgrade");
|
|
},
|
|
colors: [
|
|
Color(0xFF003058),
|
|
], // 渐变色是同一个色,也可以根据需要调整
|
|
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: TextStyle(
|
|
color: Colors.white,
|
|
fontFamily: 'Inter',
|
|
fontSize:
|
|
AppConstants().normal_text_fontSize,
|
|
letterSpacing: 0.0,
|
|
),
|
|
),
|
|
].divide(SizedBox(
|
|
width: 17.rpx,
|
|
)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsetsDirectional.fromSTEB(
|
|
0.rpx, 0.rpx, 0.rpx, 0),
|
|
child: CustomCard(
|
|
borderRadius: 16.rpx,
|
|
onTap: () {
|
|
// Get.toNamed("/deviceUpgrade");
|
|
NewTopSlideNotification.show(
|
|
text: "功能开发中...".tr,
|
|
);
|
|
},
|
|
colors: [
|
|
Color(0xFF003058),
|
|
], // 渐变色是同一个色,也可以根据需要调整
|
|
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: TextStyle(
|
|
color: Colors.white,
|
|
fontFamily: 'Inter',
|
|
fontSize:
|
|
AppConstants().normal_text_fontSize,
|
|
letterSpacing: 0.0,
|
|
),
|
|
),
|
|
].divide(SizedBox(
|
|
width: 17.rpx,
|
|
)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
].divide(SizedBox(
|
|
height: 20.rpx,
|
|
)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
)),
|
|
);
|
|
});
|
|
}
|
|
}
|