修改ui设计错误

This commit is contained in:
czz
2025-06-11 08:47:06 +08:00
parent 501d133bad
commit 6ec1c79866
36 changed files with 2200 additions and 350 deletions

View File

@@ -532,15 +532,156 @@ Future<void> showHeightPickerDialog(
);
}
Future showDayTimeSelectionDialog(BuildContext context,
{required List<int> dayTimeArr, Function? checkChange, String title = ""}) {
// Future showDayTimeSelectionDialog(BuildContext context,
// {required List<int> dayTimeArr, Function? checkChange, String title = ""}) {
// ThemeController themeController = Get.find();
// final hours = List.generate(24, (i) => i);
// final minutes = List.generate(60, (i) => i);
// final RxInt hoursIndex = RxInt(hours.indexOf(dayTimeArr[0]));
// final RxInt minutesIndex = RxInt(minutes.indexOf(dayTimeArr[1]));
// return showDialog(
// context: context,
// barrierDismissible: true,
// builder: (BuildContext context) {
// return Stack(
// children: [
// Positioned(
// bottom: 0,
// left: 0,
// right: 0,
// child: Material(
// color: Colors.transparent,
// child: Dialog(
// backgroundColor: stringToColor("#182B7C"),
// insetPadding: EdgeInsets.zero,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(0),
// ),
// child: Container(
// width: double.infinity,
// padding: EdgeInsets.fromLTRB(30.rpx, 10.rpx, 30.rpx, 90.rpx),
// child: Column(
// mainAxisSize: MainAxisSize.min,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: <Widget>[
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// title,
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: themeController.currentColor.sc3,
// fontSize: 30.rpx,
// ),
// ),
// closeIconWhite,
// ],
// ),
// Container(
// height: 240.rpx,
// margin: EdgeInsets.only(top: 60.rpx, bottom: 60.rpx),
// padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
// child: Row(
// children: [
// Expanded(
// child: Padding(
// padding:
// EdgeInsets.symmetric(horizontal: 10.rpx),
// child: getOnePickers(context, hours, hoursIndex,
// unit: ''),
// ),
// ),
// Text(
// "时",
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: themeController.currentColor.sc3,
// fontSize: 30.rpx,
// ),
// ),
// Expanded(
// child: Padding(
// padding:
// EdgeInsets.symmetric(horizontal: 10.rpx),
// child: getOnePickers(
// context, minutes, minutesIndex,
// unit: ''),
// ),
// ),
// Text(
// "分",
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: themeController.currentColor.sc3,
// fontSize: 30.rpx,
// ),
// ),
// ],
// ),
// ),
// InkWell(
// onTap: () {
// checkChange?.call([
// hours[hoursIndex.value],
// minutes[minutesIndex.value]
// ]);
// Get.back();
// },
// child: Container(
// height: 68.rpx,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: stringToColor("#D3B684"),
// borderRadius: BorderRadius.circular(10.rpx),
// ),
// child: Text(
// "确定",
// style: FlutterFlowTheme.of(context)
// .bodyMedium
// .override(
// fontFamily: 'Readex Pro',
// color: themeController.currentColor.sc3,
// fontSize: 30.rpx,
// ),
// ),
// ),
// )
// ],
// ),
// ),
// ),
// ),
// ),
// ],
// );
// },
// );
// }
Future showDayTimeSelectionDialog(
BuildContext context, {
required List<int> dayTimeArr,
Function(List<int>)? checkChange,
String title = "选择时间",
}) {
ThemeController themeController = Get.find();
Color checkColor = stringToColor("#D3B684");
final hours = List.generate(24, (i) => i);
final minutes = List.generate(60, (i) => i);
final List<int> hours = List.generate(24, (i) => i);
final List<int> minutes = List.generate(60, (i) => i);
final RxInt hoursIndex = RxInt(hours.indexOf(dayTimeArr[0]));
final RxInt minutesIndex = RxInt(minutes.indexOf(dayTimeArr[1]));
final RxInt hoursIndex = hours.indexOf(dayTimeArr[0]).obs;
final RxInt minutesIndex = minutes.indexOf(dayTimeArr[1]).obs;
return showDialog(
context: context,
@@ -555,7 +696,7 @@ Future showDayTimeSelectionDialog(BuildContext context,
child: Material(
color: Colors.transparent,
child: Dialog(
backgroundColor: stringToColor("#182B7C"),
backgroundColor: const Color(0xFF003058),
insetPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0),
@@ -567,9 +708,24 @@ Future showDayTimeSelectionDialog(BuildContext context,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
// 顶部栏:取消 - 标题 - 确认
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.zero,
onTap: () => Navigator.of(context).pop(),
child: Container(
width: 100.rpx,
height: 60.rpx,
alignment: Alignment.center,
child: Text("取消",
style: TextStyle(
fontSize: 30.rpx, color: Colors.white)),
),
),
Text(
title,
style: FlutterFlowTheme.of(context)
@@ -580,82 +736,74 @@ Future showDayTimeSelectionDialog(BuildContext context,
fontSize: 30.rpx,
),
),
closeIconWhite,
ClickableContainer(
backgroundColor: Colors.transparent,
highlightColor: Colors.transparent,
padding: EdgeInsets.zero,
onTap: () {
checkChange?.call([
hours[hoursIndex.value],
minutes[minutesIndex.value],
]);
Get.back();
},
child: Container(
width: 100.rpx,
height: 60.rpx,
alignment: Alignment.center,
child: Text("确认",
style: TextStyle(
fontSize: 30.rpx, color: Colors.white)),
),
),
],
),
Container(
height: 240.rpx,
margin: EdgeInsets.only(top: 60.rpx, bottom: 60.rpx),
padding: EdgeInsets.only(left: 30.rpx, right: 30.rpx),
child: Row(
children: [
Expanded(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 10.rpx),
child: getOnePickers(context, hours, hoursIndex,
unit: ''),
),
),
Text(
"",
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
fontSize: 30.rpx,
SizedBox(height: 20.rpx),
Stack(
children: [
Positioned.fill(
child: IgnorePointer(
child: Center(
child: Container(
height: 90.rpx,
margin:
EdgeInsets.symmetric(horizontal: 95.rpx),
decoration: BoxDecoration(
color: const Color(0xFF84F5FF),
borderRadius: BorderRadius.circular(16.rpx),
),
),
Expanded(
child: Padding(
padding:
EdgeInsets.symmetric(horizontal: 10.rpx),
child: getOnePickers(
context, minutes, minutesIndex,
unit: ''),
),
),
Text(
"",
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
fontSize: 30.rpx,
),
),
],
),
),
InkWell(
onTap: () {
checkChange?.call([
hours[hoursIndex.value],
minutes[minutesIndex.value]
]);
Get.back();
},
child: Container(
height: 68.rpx,
alignment: Alignment.center,
decoration: BoxDecoration(
color: stringToColor("#D3B684"),
borderRadius: BorderRadius.circular(10.rpx),
),
child: Text(
"确定",
style: FlutterFlowTheme.of(context)
.bodyMedium
.override(
fontFamily: 'Readex Pro',
color: themeController.currentColor.sc3,
fontSize: 30.rpx,
),
),
),
),
),
)
SizedBox(
height: 240.rpx,
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 95.rpx),
child: Row(
children: [
Expanded(
child: getOnePickers(
context,
hours,
hoursIndex,
unit: "",
),
),
Expanded(
child: getOnePickers(
context,
minutes,
minutesIndex,
unit: "",
),
),
],
),
),
),
],
),
],
),
),