Bug Fixes
parent
0bbc288da9
commit
d0e733ffd3
@ -1,170 +1,170 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mc_common_app/classes/consts.dart';
|
||||
import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||
import 'package:mc_common_app/theme/colors.dart';
|
||||
import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/branch_details_card.dart';
|
||||
import 'package:mc_common_app/widgets/common_widgets/time_slots.dart';
|
||||
import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
|
||||
import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
class BookProviderAppView extends StatefulWidget {
|
||||
const BookProviderAppView({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<BookProviderAppView> createState() => _BookProviderAppViewState();
|
||||
}
|
||||
|
||||
class _BookProviderAppViewState extends State<BookProviderAppView> {
|
||||
bool isReview = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
title: LocaleKeys.appointment.tr(),
|
||||
profileImageUrl: MyAssets.bnCar,
|
||||
isRemoveBackButton: false,
|
||||
isDrawerEnabled: false,
|
||||
),
|
||||
body: Container(
|
||||
color: MyColors.backgroundColor,
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView(
|
||||
children: [
|
||||
BranchDetailCard(
|
||||
onCardTapped: () {},
|
||||
providerImageUrl: MyAssets.bnCar,
|
||||
providerLocation: "3km",
|
||||
title: "Al Ahmed Maintenance",
|
||||
providerRatings: 4.9,
|
||||
),
|
||||
12.height,
|
||||
isReview ? const ReviewAppointmentSection() : const ServicesSelectionSection(),
|
||||
10.height,
|
||||
],
|
||||
),
|
||||
),
|
||||
10.height,
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: ShowFillButton(
|
||||
title: LocaleKeys.bookAppointment.tr(),
|
||||
maxWidth: double.infinity,
|
||||
onPressed: () {
|
||||
isReview = !isReview;
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ServicesSelectionSection extends StatelessWidget {
|
||||
const ServicesSelectionSection({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
List<DropValue> dropList = [
|
||||
DropValue(0, "Maintenance", ""),
|
||||
DropValue(1, "Car Wash", ""),
|
||||
DropValue(2, "Monthly Checkup", ""),
|
||||
DropValue(3, "Friendly Visit", ""),
|
||||
DropValue(4, "Muftaa", ""),
|
||||
];
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.selectServicesYouWant.tr().toText(fontSize: 18, isBold: true),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: LocaleKeys.selectServiceType.tr(),
|
||||
),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: LocaleKeys.selectServiceType.tr(),
|
||||
),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: LocaleKeys.selectServiceType.tr(),
|
||||
),
|
||||
22.height,
|
||||
LocaleKeys.selectDateAndTime.tr().toText(fontSize: 18, isBold: true),
|
||||
8.height,
|
||||
DropdownField(
|
||||
(DropValue value) {},
|
||||
list: dropList,
|
||||
hint: LocaleKeys.selectServiceType.tr(),
|
||||
),
|
||||
22.height,
|
||||
LocaleKeys.availableSlots.tr().toText(fontSize: 15, isBold: true),
|
||||
8.height,
|
||||
BuildTimeSlots(onPressed: (index) {}, timeSlots: []),
|
||||
22.height,
|
||||
LocaleKeys.totalAmount.tr().toText(fontSize: 18, isBold: true),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"3000".toText(fontSize: 20, isBold: true),
|
||||
LocaleKeys.sar.tr().toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
10.height,
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class ReviewAppointmentSection extends StatelessWidget {
|
||||
const ReviewAppointmentSection({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
LocaleKeys.reviewAppointment.tr().toText(fontSize: 18, isBold: true),
|
||||
15.height,
|
||||
LocaleKeys.services.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
LocaleKeys.carEngineCheck.tr().toText(fontSize: 18, isBold: true),
|
||||
13.height,
|
||||
LocaleKeys.dateAndTime.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
"2 Feb, 2023 at 09:00am".toText(fontSize: 18, isBold: true),
|
||||
13.height,
|
||||
LocaleKeys.totalAmount.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
"3000".toText(fontSize: 20, isBold: true),
|
||||
LocaleKeys.sar.tr().toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
100.height,
|
||||
],
|
||||
).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
);
|
||||
}
|
||||
}
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:mc_common_app/classes/consts.dart';
|
||||
// import 'package:mc_common_app/extensions/int_extensions.dart';
|
||||
// import 'package:mc_common_app/extensions/string_extensions.dart';
|
||||
// import 'package:mc_common_app/generated/locale_keys.g.dart';
|
||||
// import 'package:mc_common_app/theme/colors.dart';
|
||||
// import 'package:mc_common_app/widgets/button/show_fill_button.dart';
|
||||
// import 'package:mc_common_app/widgets/common_widgets/app_bar.dart';
|
||||
// import 'package:mc_common_app/widgets/common_widgets/branch_details_card.dart';
|
||||
// import 'package:mc_common_app/widgets/common_widgets/time_slots.dart';
|
||||
// import 'package:mc_common_app/widgets/dropdown/dropdow_field.dart';
|
||||
// import 'package:mc_common_app/widgets/extensions/extensions_widget.dart';
|
||||
// import 'package:easy_localization/easy_localization.dart';
|
||||
//
|
||||
// class BookProviderAppView extends StatefulWidget {
|
||||
// const BookProviderAppView({Key? key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// State<BookProviderAppView> createState() => _BookProviderAppViewState();
|
||||
// }
|
||||
//
|
||||
// class _BookProviderAppViewState extends State<BookProviderAppView> {
|
||||
// bool isReview = false;
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: CustomAppBar(
|
||||
// title: LocaleKeys.appointment.tr(),
|
||||
// profileImageUrl: MyAssets.bnCar,
|
||||
// isRemoveBackButton: false,
|
||||
// isDrawerEnabled: false,
|
||||
// ),
|
||||
// body: Container(
|
||||
// color: MyColors.backgroundColor,
|
||||
// width: double.infinity,
|
||||
// height: double.infinity,
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: ListView(
|
||||
// children: [
|
||||
// BranchDetailCard(
|
||||
// onCardTapped: () {},
|
||||
// providerImageUrl: MyAssets.bnCar,
|
||||
// providerLocation: "3km",
|
||||
// title: "Al Ahmed Maintenance",
|
||||
// providerRatings: 4.9,
|
||||
// ),
|
||||
// 12.height,
|
||||
// isReview ? const ReviewAppointmentSection() : const ServicesSelectionSection(),
|
||||
// 10.height,
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// 10.height,
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
// child: ShowFillButton(
|
||||
// title: LocaleKeys.bookAppointment.tr(),
|
||||
// maxWidth: double.infinity,
|
||||
// onPressed: () {
|
||||
// isReview = !isReview;
|
||||
// setState(() {});
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class ServicesSelectionSection extends StatelessWidget {
|
||||
// const ServicesSelectionSection({Key? key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// List<DropValue> dropList = [
|
||||
// DropValue(0, "Maintenance", ""),
|
||||
// DropValue(1, "Car Wash", ""),
|
||||
// DropValue(2, "Monthly Checkup", ""),
|
||||
// DropValue(3, "Friendly Visit", ""),
|
||||
// DropValue(4, "Muftaa", ""),
|
||||
// ];
|
||||
// return Container(
|
||||
// padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// LocaleKeys.selectServicesYouWant.tr().toText(fontSize: 18, isBold: true),
|
||||
// 8.height,
|
||||
// DropdownField(
|
||||
// (DropValue value) {},
|
||||
// list: dropList,
|
||||
// hint: LocaleKeys.selectServiceType.tr(),
|
||||
// ),
|
||||
// 8.height,
|
||||
// DropdownField(
|
||||
// (DropValue value) {},
|
||||
// list: dropList,
|
||||
// hint: LocaleKeys.selectServiceType.tr(),
|
||||
// ),
|
||||
// 8.height,
|
||||
// DropdownField(
|
||||
// (DropValue value) {},
|
||||
// list: dropList,
|
||||
// hint: LocaleKeys.selectServiceType.tr(),
|
||||
// ),
|
||||
// 22.height,
|
||||
// LocaleKeys.selectDateAndTime.tr().toText(fontSize: 18, isBold: true),
|
||||
// 8.height,
|
||||
// DropdownField(
|
||||
// (DropValue value) {},
|
||||
// list: dropList,
|
||||
// hint: LocaleKeys.selectServiceType.tr(),
|
||||
// ),
|
||||
// 22.height,
|
||||
// LocaleKeys.availableSlots.tr().toText(fontSize: 15, isBold: true),
|
||||
// 8.height,
|
||||
// BuildTimeSlots(onPressed: (index) {}, timeSlots: []),
|
||||
// 22.height,
|
||||
// LocaleKeys.totalAmount.tr().toText(fontSize: 18, isBold: true),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// "3000".toText(fontSize: 20, isBold: true),
|
||||
// LocaleKeys.sar.tr().toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
// ],
|
||||
// ),
|
||||
// 10.height,
|
||||
// ],
|
||||
// ).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class ReviewAppointmentSection extends StatelessWidget {
|
||||
// const ReviewAppointmentSection({Key? key}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Container(
|
||||
// padding: const EdgeInsets.only(bottom: 10, left: 21, right: 21),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// LocaleKeys.reviewAppointment.tr().toText(fontSize: 18, isBold: true),
|
||||
// 15.height,
|
||||
// LocaleKeys.services.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
// LocaleKeys.carEngineCheck.tr().toText(fontSize: 18, isBold: true),
|
||||
// 13.height,
|
||||
// LocaleKeys.dateAndTime.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
// "2 Feb, 2023 at 09:00am".toText(fontSize: 18, isBold: true),
|
||||
// 13.height,
|
||||
// LocaleKeys.totalAmount.tr().toText(fontSize: 14, isBold: true, color: MyColors.lightTextColor),
|
||||
// Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.end,
|
||||
// children: [
|
||||
// "3000".toText(fontSize: 20, isBold: true),
|
||||
// LocaleKeys.sar.tr().toText(fontSize: 10, isBold: true, color: MyColors.lightTextColor),
|
||||
// ],
|
||||
// ),
|
||||
// 100.height,
|
||||
// ],
|
||||
// ).toWhiteContainer(width: double.infinity, allPading: 12),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
Loading…
Reference in New Issue