Files
tuiche/lib/pages/mh_page/book_success_page.dart
2026-04-07 14:49:31 +08:00

231 lines
9.5 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import 'package:ef/ef.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutterflow_ui/flutterflow_ui.dart';
import 'package:vbvs_app/common/util/FitTool.dart';
import 'package:vbvs_app/common/util/MyUtils.dart';
class BookSuccessPage extends GetView {
final scaffoldKey = GlobalKey<ScaffoldState>();
BoxConstraints? bodysize;
Map data;
BookSuccessPage({required this.data});
final infoList = [
{"label": "预约编号:".tr, "value": "54648614654646"},
{"label": "预约人员:".tr, "value": "张大大".tr},
{"label": "手机号码:".tr, "value": "139****5699"},
{"label": "体验时间:".tr, "value": "2024-02-15 07:30"},
{"label": "预约门店:".tr, "value": "SWES眠花糖杭州南星桥旗舰店".tr},
{"label": "门店地址:".tr, "value": "浙江省杭州市上城区飞云江路45号一层".tr},
];
@override
Widget build(BuildContext context) {
return LayoutBuilder(builder: (context, cc) {
bodysize = cc;
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(
// key: scaffoldKey,
backgroundColor: Colors.transparent,
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: Colors.transparent, // 状态栏背景色
statusBarIconBrightness: Brightness.light, // 图标颜色Android
statusBarBrightness: Brightness.light, // 图标颜色iOS
),
backgroundColor: Colors.transparent,
automaticallyImplyLeading: false,
iconTheme: IconThemeData(color: Colors.white),
titleSpacing: 0,
// leading: returnIconButtomAddCallback(() {
// controller.saveDataApi();
// updateParm(isShowToast: false);
// }),
// leading: returnIconButtomNew,
title: Container(
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(),
),
],
),
),
actions: [],
centerTitle: false,
),
body: Container(
width: bodysize!.maxWidth,
height: bodysize!.maxHeight * 1,
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: bodysize!.maxWidth,
margin: EdgeInsets.only(top: 90.rpx),
child: Column(
mainAxisSize: MainAxisSize.max,
children: [
Container(
width: 148.rpx,
height: 148.rpx,
clipBehavior: Clip.antiAlias,
decoration: const BoxDecoration(
shape: BoxShape.circle,
),
child: Image.asset(
'assets/images/success.png',
fit: BoxFit.contain,
color: Color(0xFF84F5FF),
),
),
Align(
alignment: const AlignmentDirectional(0, 0),
child: Text(
'预约成功!'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
fontSize: 30.rpx,
color: Colors.white,
letterSpacing: 0,
fontWeight: FontWeight.w600,
),
),
),
].divide(SizedBox(height: 30.rpx)),
),
),
Container(
margin:
EdgeInsets.only(left: 30.rpx, right: 30.rpx, top: 55.rpx),
width: bodysize!.maxWidth,
decoration: BoxDecoration(
color: Color(0xFF003058),
borderRadius: BorderRadius.circular(16.rpx),
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20), // 上间距
for (var item in infoList)
Container(
height: 60.rpx,
padding: EdgeInsets.symmetric(horizontal: 35.rpx),
alignment: Alignment.centerLeft,
child: Row(
children: [
Text(
item['label']!,
style: TextStyle(
color: Color(0XFF929699),
fontSize: 26.rpx,
),
),
SizedBox(width: 30.rpx),
Text(
item['value']!,
style: TextStyle(
color: Colors.white,
fontSize: 26.rpx,
),
),
],
)),
SizedBox(height: 60.rpx), // 空间隔断
Padding(
padding: EdgeInsets.symmetric(horizontal: 35),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"关闭".tr,
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
)),
SizedBox(width: 60.rpx),
SizedBox(
width: 200.rpx,
height: 60.rpx,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: Color(0xFF84F5FF),
padding: EdgeInsets.zero, // 去除文字内边距
tapTargetSize: MaterialTapTargetSize
.shrinkWrap, // 去除额外点击区域
// shape:
// RoundedRectangleBorder(), // 可选:去除默认圆角
),
onPressed: () {},
child: Center(
// 保证文字居中
child: Text(
"我的预约".tr,
style: TextStyle(
color: Color(0XFF011D33),
fontSize: 26.rpx,
),
),
),
))
],
),
),
SizedBox(height: 80.rpx), // 下间距
],
)),
),
],
),
),
),
));
});
}
}