|
|
|
@ -27,14 +27,17 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
|
|
|
|
|
Widget getCarouselSliderWidget(AppType appType, AppointmentsVM appointmentsVM) {
|
|
|
|
|
return CarouselSlider.builder(
|
|
|
|
|
options: CarouselOptions(
|
|
|
|
|
height: appType == AppType.provider ? 121 : 140,
|
|
|
|
|
viewportFraction: 0.99999, // Todo: Dont do anything
|
|
|
|
|
height: appType == AppType.provider ? 121 : 96,
|
|
|
|
|
viewportFraction: 1,
|
|
|
|
|
pageSnapping: true,
|
|
|
|
|
enlargeCenterPage: false,
|
|
|
|
|
enableInfiniteScroll: false,
|
|
|
|
|
),
|
|
|
|
|
itemCount: appointmentsVM.myUpComingAppointments.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) => BuildAppointmentContainerForCustomer(
|
|
|
|
|
itemBuilder: (BuildContext context, int itemIndex, int pageViewIndex) =>
|
|
|
|
|
BuildAppointmentContainerForCustomer(
|
|
|
|
|
isForProvider: appType == AppType.provider,
|
|
|
|
|
isForCustomerHome: true,
|
|
|
|
|
appointmentListModel: appointmentsVM.myUpComingAppointments[itemIndex],
|
|
|
|
|
onTapped: () {
|
|
|
|
|
if (appType == AppType.provider) {
|
|
|
|
@ -142,10 +145,11 @@ class CommonAppointmentSliderWidget extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
class BuildAppointmentContainerForCustomer extends StatelessWidget {
|
|
|
|
|
final bool isForProvider;
|
|
|
|
|
final bool isForCustomerHome;
|
|
|
|
|
final AppointmentListModel? appointmentListModel;
|
|
|
|
|
final Function()? onTapped;
|
|
|
|
|
|
|
|
|
|
const BuildAppointmentContainerForCustomer({Key? key, this.isForProvider = false, this.onTapped, required this.appointmentListModel}) : super(key: key);
|
|
|
|
|
const BuildAppointmentContainerForCustomer({Key? key, this.isForProvider = false, this.onTapped, required this.appointmentListModel, this.isForCustomerHome = false}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
Widget showServices(String title, String icon, {bool isMoreText = false}) {
|
|
|
|
|
return Row(
|
|
|
|
@ -205,9 +209,11 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
|
|
|
|
|
? SizedBox()
|
|
|
|
|
: Image.asset(
|
|
|
|
|
MyAssets.bnCar,
|
|
|
|
|
width: 46,
|
|
|
|
|
height: 46,
|
|
|
|
|
width: isForCustomerHome ? 46 : 77,
|
|
|
|
|
height: isForCustomerHome ? 46 : 113,
|
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
|
).toCircle(
|
|
|
|
|
borderRadius: isForCustomerHome ? 100 : 0,
|
|
|
|
|
),
|
|
|
|
|
8.width,
|
|
|
|
|
Expanded(
|
|
|
|
@ -215,11 +221,13 @@ class BuildAppointmentContainerForCustomer extends StatelessWidget {
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
(AppState().currentAppType == AppType.provider ? appointmentListModel!.branchName ?? "" : appointmentListModel!.branchName ?? "")
|
|
|
|
|
.toText(color: MyColors.greyColor, fontSize: 12, letterSpacing: 0, height: 19 / 12),
|
|
|
|
|
(AppState().currentAppType == AppType.provider ? appointmentListModel!.customerName ?? "" : appointmentListModel!.branchName ?? "")
|
|
|
|
|
.toText(color: MyColors.black, fontSize: 16, letterSpacing: -0.64, height: 24 / 16),
|
|
|
|
|
Row(
|
|
|
|
|
AppState().currentAppType == AppType.provider ? (AppState().currentAppType == AppType.provider ? appointmentListModel!.branchName ?? "" : appointmentListModel!.branchName ?? "")
|
|
|
|
|
.toText(color: MyColors.greyColor, fontSize: 12, letterSpacing: 0, height: 19 / 12) : SizedBox(),
|
|
|
|
|
|
|
|
|
|
(AppState().currentAppType == AppType.provider ? appointmentListModel!.providerName ?? "" : appointmentListModel!.branchName ?? "")
|
|
|
|
|
.toText(color: MyColors.black, fontSize: 16, letterSpacing: -0.64, height: 24 / 16)
|
|
|
|
|
|
|
|
|
|
, Row(
|
|
|
|
|
children: [
|
|
|
|
|
!isForProvider ? MyAssets.miniClock.buildSvg(height: 12) : SizedBox(),
|
|
|
|
|
2.width,
|
|
|
|
|