|
|
|
|
@ -96,7 +96,6 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
10.height,
|
|
|
|
|
Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -106,21 +105,25 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
itemCount: appointmentsVM.servicesInSchedule.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int serviceIndex) {
|
|
|
|
|
DropValue selectedService = appointmentsVM.servicesInSchedule[serviceIndex];
|
|
|
|
|
String selectedTimeSlot = "";
|
|
|
|
|
if (scheduleData.selectedCustomTimeDateSlotModel!.availableSlots != null) {
|
|
|
|
|
selectedTimeSlot = scheduleData.selectedCustomTimeDateSlotModel!.availableSlots!.firstWhere((element) => element.isSelected).slot;
|
|
|
|
|
}
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: selectedService.value.toText(fontSize: 15, isBold: true),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
// Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: selectedService.value.toText(fontSize: 14, isBold: true),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
if (true) ...[
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Service Location: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
("Home").toText(fontSize: 12, isBold: true).expand(),
|
|
|
|
|
(appointmentsVM.isHomeTapped ? "Home" : "Workshop").toText(fontSize: 12, isBold: true).expand(),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
5.height,
|
|
|
|
|
@ -130,12 +133,31 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
return Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"${itemData.name}: ".toText(fontSize: 13, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
"${itemData.name}: ${itemData.price} SAR".toText(fontSize: 13, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
5.height,
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
"Time & Location".toText(fontSize: 14, isBold: true),
|
|
|
|
|
3.height,
|
|
|
|
|
Row(children: [
|
|
|
|
|
"Date & Time: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
"${scheduleData.selectedCustomTimeDateSlotModel!.date!.date} at ${selectedTimeSlot}".toText(fontSize: 12, isBold: true),
|
|
|
|
|
]),
|
|
|
|
|
Row(children: [
|
|
|
|
|
"Location: ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
"PM58+F97, Al Olaya, Riyadh 12333".toText(fontSize: 12, isBold: true),
|
|
|
|
|
]),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
@ -144,35 +166,9 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).toWhiteContainer(width: double.infinity, allPading: 12, margin: const EdgeInsets.symmetric(horizontal: 21, vertical: 10));
|
|
|
|
|
).toWhiteContainer(width: double.infinity, allPading: 12, margin: const EdgeInsets.symmetric(horizontal: 21, vertical: 0));
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
// AppointmentsVM appointmentsVM = context.read<AppointmentsVM>();
|
|
|
|
|
// return SizedBox(
|
|
|
|
|
// width: double.infinity,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: List.generate(
|
|
|
|
|
// appointmentsVM.servicesInSchedule.length,
|
|
|
|
|
// (serviceIndex) => Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: [
|
|
|
|
|
// appointmentsVM.servicesInSchedule[serviceIndex].value.toText(fontSize: 16, isBold: true),
|
|
|
|
|
// Column(
|
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
// children: List.generate(
|
|
|
|
|
// appointmentsVM,
|
|
|
|
|
// (index) => itemList[index].toText(
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
// color: MyColors.lightTextColor,
|
|
|
|
|
// isBold: true,
|
|
|
|
|
// )),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ).paddingOnly(bottom: 14),
|
|
|
|
|
// ),
|
|
|
|
|
// ).toWhiteContainer(width: double.infinity, allPading: 12, margin: EdgeInsets.symmetric(horizontal: 21)),
|
|
|
|
|
// );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget buildTimeAndLocationInfoCard() {
|
|
|
|
|
@ -231,25 +227,25 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
10.height,
|
|
|
|
|
Divider(thickness: 0.7),
|
|
|
|
|
"Home Location".toText(fontSize: 16, isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"10km ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
"5 x 10".toText(fontSize: 12, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
"50 SAR".toText(fontSize: 16, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
10.height,
|
|
|
|
|
Divider(
|
|
|
|
|
thickness: 0.7,
|
|
|
|
|
),
|
|
|
|
|
if (appointmentsVM.isHomeTapped) ...[
|
|
|
|
|
"Home Location".toText(fontSize: 16, isBold: true),
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"10km ".toText(fontSize: 12, color: MyColors.lightTextColor, isBold: true),
|
|
|
|
|
"5 x 10".toText(fontSize: 12, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
"50 SAR".toText(fontSize: 16, isBold: true),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
10.height,
|
|
|
|
|
Divider(thickness: 0.7),
|
|
|
|
|
],
|
|
|
|
|
10.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
@ -258,7 +254,7 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
children: [
|
|
|
|
|
"120".toText(fontSize: 29, isBold: true),
|
|
|
|
|
totalServicePrice.toString().toText(fontSize: 29, isBold: true),
|
|
|
|
|
2.width,
|
|
|
|
|
"SAR".toText(color: MyColors.lightTextColor, fontSize: 16, isBold: true).paddingOnly(bottom: 5),
|
|
|
|
|
],
|
|
|
|
|
@ -270,12 +266,13 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
).toWhiteContainer(width: double.infinity, allPading: 12, margin: EdgeInsets.only(left: 21, right: 21, top: 10, bottom: 21));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget buildNextButtonFooter() {
|
|
|
|
|
Widget buildNextButtonFooter({required BuildContext context}) {
|
|
|
|
|
AppointmentsVM appointmentsVM = context.read<AppointmentsVM>();
|
|
|
|
|
return Container(
|
|
|
|
|
height: 90,
|
|
|
|
|
color: MyColors.white,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
Divider(thickness: 0.7, height: 3),
|
|
|
|
|
10.height,
|
|
|
|
|
@ -283,9 +280,11 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: ShowFillButton(
|
|
|
|
|
maxHeight: 55,
|
|
|
|
|
backgroundColor: MyColors.primaryColor,
|
|
|
|
|
backgroundColor: MyColors.darkPrimaryColor,
|
|
|
|
|
title: "Book Appointment",
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
onPressed: () {
|
|
|
|
|
// appointmentsVM.onBookAppointmentPressed();
|
|
|
|
|
},
|
|
|
|
|
).paddingOnly(bottom: 12, left: 21, right: 21),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
@ -303,21 +302,18 @@ class ReviewAppointment extends StatelessWidget {
|
|
|
|
|
actions: [MyAssets.searchIcon.buildSvg().paddingOnly(right: 21)],
|
|
|
|
|
onBackButtonTapped: () => Navigator.pop(context),
|
|
|
|
|
),
|
|
|
|
|
body: Stack(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
body: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
SingleChildScrollView(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
buildBranchInfoCard(context: context),
|
|
|
|
|
buildServicesInfoCard(context: context),
|
|
|
|
|
buildTimeAndLocationInfoCard(),
|
|
|
|
|
buildChargesBreakDown(context: context),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
buildNextButtonFooter(),
|
|
|
|
|
ListView(
|
|
|
|
|
children: [
|
|
|
|
|
buildBranchInfoCard(context: context),
|
|
|
|
|
buildServicesInfoCard(context: context),
|
|
|
|
|
// buildTimeAndLocationInfoCard(),
|
|
|
|
|
buildChargesBreakDown(context: context),
|
|
|
|
|
],
|
|
|
|
|
).expand(),
|
|
|
|
|
buildNextButtonFooter(context: context),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|