You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/pages/medical/eye/EyeMeasurementsPage.dart

103 lines
5.2 KiB
Dart

import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'EyeHomePage.dart';
class EyeMeasurementsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<EyeViewModel>(
onModelReady: (model) => model.getEyeMeasurement(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
description: TranslationBase.of(context).infoEye,
imagesInfo: [
ImagesInfo(
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png')
],
appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView(
child: Column(
children: [
ListView.separated(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) {
return Container(
height: 12,
margin: EdgeInsets.only(left: 21, right: 21),
// color: Color(0xffD9D9D9),
);
},
itemBuilder: (context, index) {
List<AppoimentAllHistoryResultList> _appointmentAllHistoryResultList = model.appointmentFilter[index].appointmentAllHistoryResultList;
return AppExpandableNotifier(
title: model.appointmentFilter[index].filterName,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
itemBuilder: (context, _index) {
AppoimentAllHistoryResultList _appointmentResult = _appointmentAllHistoryResultList[_index];
return DoctorCard(
onTap: () => Navigator.push(
context,
FadePage(
page: EyeHomePage(
appointmentAllHistoryResultList: _appointmentResult,
),
),
),
isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
// billNo: "appointmentResult.do",
profileUrl: _appointmentResult.doctorImageURL,
subName: _appointmentResult.clinicName,
isLiveCareAppointment: _appointmentResult.isLiveCareAppointment,
date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate),
isSortByClinic: false,
rating: _appointmentResult.actualDoctorRate + 0.0,
// appointmentTime: _appointmentResult.startTime.substring(0, 5),
// remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED)
// ? _appointmentResult.remaniningHoursTocanPay
// : null
//projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: _appointmentAllHistoryResultList.length),
);
},
itemCount: model.appointmentFilter.length,
),
],
),
),
),
);
}
}