137 lines
4.7 KiB
Dart
137 lines
4.7 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/util/FitTool.dart';
|
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
|
import 'package:vbvs_app/controller/device/body_device_controller.dart';
|
|
import 'package:vbvs_app/controller/device/device_type_controller.dart';
|
|
import 'package:vbvs_app/controller/repair/repair_controller.dart';
|
|
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
|
import 'package:vbvs_app/pages/repair/component/RepairHistoryInfoWidget.dart';
|
|
|
|
class RepairListPage extends StatefulWidget {
|
|
const RepairListPage({super.key});
|
|
|
|
@override
|
|
State<RepairListPage> createState() => _RepairListPageState();
|
|
}
|
|
|
|
class _RepairListPageState extends State<RepairListPage> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
loadData();
|
|
}
|
|
|
|
@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, // 填满整个 Container
|
|
),
|
|
),
|
|
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: 'Readex Pro',
|
|
color: themeController.currentColor.sc3,
|
|
letterSpacing: 0,
|
|
fontSize: 30.rpx,
|
|
),
|
|
),
|
|
Positioned(
|
|
left: 0,
|
|
// child: returnIconButtom,
|
|
child: returnIconButtomAddCallback(() {}),
|
|
),
|
|
// Positioned(
|
|
// right: 20.rpx,
|
|
// child: ClickableContainer(
|
|
// backgroundColor: Colors.transparent,
|
|
// highlightColor: themeController.currentColor.sc16,
|
|
// padding: EdgeInsets.all(8.rpx),
|
|
// onTap: () {},
|
|
// child: SvgPicture.asset(
|
|
// 'assets/img/icon/history.svg',
|
|
// width: 39.rpx,
|
|
// height: 39.rpx,
|
|
// color: themeController.currentColor.sc16,
|
|
// ),
|
|
// ),
|
|
// ),
|
|
],
|
|
),
|
|
),
|
|
actions: [],
|
|
centerTitle: false,
|
|
),
|
|
body: SafeArea(
|
|
top: true,
|
|
child: Padding(
|
|
padding:
|
|
EdgeInsetsDirectional.fromSTEB(30.rpx, 29.rpx, 30.rpx, 0),
|
|
child: SingleChildScrollView(
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
children: [
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
RepairHistoryInfoWidget(),
|
|
]
|
|
.divide(SizedBox(
|
|
height: 25.rpx,
|
|
))
|
|
.addToEnd(SizedBox(
|
|
height: 25.rpx,
|
|
)),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
Future<void> loadData() async {
|
|
// repairController.repairHistory.value = [{}];
|
|
// ApiResponse apiResponse = await requestWithLog(
|
|
// logTitle: "请求维修列表", method: MyHttpMethod.get, queryUrl: "");
|
|
// if (apiResponse.code == HttpStatusCodes.ok) {
|
|
// //请求维修列表
|
|
// }
|
|
}
|
|
}
|