成功预约

This commit is contained in:
GYJ
2024-11-27 10:13:22 +08:00
parent 3c1995d118
commit 1a88faae34
8 changed files with 172 additions and 17 deletions

View File

@@ -8,14 +8,10 @@ class ReserveLeftContentView extends StatelessWidget {
final double contentWidth = 430;
final double inputItemHeight = 36;
final ReserveViewModel provider;
final Animation<double> animationSizeFactor;
final AnimationController animationController;
const ReserveLeftContentView(
{super.key,
required this.provider,
required this.animationSizeFactor,
required this.animationController});
required this.provider});
@override
Widget build(BuildContext context) {
@@ -33,7 +29,7 @@ class ReserveLeftContentView extends StatelessWidget {
Widget _buildBookingWidget(BuildContext context) {
return SizeTransition(
sizeFactor: animationSizeFactor,
sizeFactor: provider.animationSizeFactor!,
axis: Axis.vertical,
axisAlignment: -1, // 设置为 -1使动画从下往上开始
child: Container(
@@ -89,7 +85,7 @@ class ReserveLeftContentView extends StatelessWidget {
padding: const EdgeInsets.fromLTRB(20, 10, 20, 15),
child: InkWell(
onTap: () {
animationController.forward();
provider.showReserveInfoView();
},
child: Container(
decoration: BoxDecoration(
@@ -187,7 +183,9 @@ class ReserveLeftContentView extends StatelessWidget {
),
const Expanded(child: SizedBox()),
InkWell(
onTap: () {},
onTap: () {
provider.execCallLog(model);
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
@@ -277,7 +275,7 @@ class ReserveLeftContentView extends StatelessWidget {
"请选择桌台",
style: TextStyle(color: Color(0xff333333), fontSize: 14),
),
Text(provider.selectedTable?.name ?? "",
Text(provider.showTableName,
style:
const TextStyle(color: Color(0xff333333), fontSize: 14)),
],
@@ -335,11 +333,13 @@ class ReserveLeftContentView extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_buildBookingActionBtn(context, "预约", () {}),
_buildBookingActionBtn(context, "预约", () {
provider.commitReserveInfo();
}),
_buildBookingActionBtn(context, "预约并短信", () {}),
_buildBookingActionBtn(context, "发路线", () {}),
_buildBookingActionBtn(context, "取消", () {
animationController.reverse();
provider.hideReserveInfoView();
}),
],
),