Merge branch 'mirza_home_page' into development_new_design_2.0

merge-requests/390/head
Mirza.Shafique 4 years ago
commit 4f85652562

@ -66,74 +66,76 @@ class AppoimentAllHistoryResultList {
String qR;
int remaniningHoursTocanPay;
bool sMSButtonVisable;
bool isInOutPatient;
AppoimentAllHistoryResultList(
{this.setupID,
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable,
this.clinicID,
this.patientType,
this.visitType});
AppoimentAllHistoryResultList({
this.setupID,
this.projectID,
this.appointmentNo,
this.appointmentDate,
this.appointmentDateN,
this.appointmentType,
this.bookDate,
this.patientID,
this.doctorID,
this.endDate,
this.startTime,
this.endTime,
this.status,
this.visitFor,
this.patientStatusType,
this.companyID,
this.bookedBy,
this.bookedOn,
this.confirmedBy,
this.confirmedOn,
this.arrivalChangedBy,
this.arrivedOn,
this.editedBy,
this.editedOn,
this.doctorName,
this.doctorNameN,
this.statusDesc,
this.statusDescN,
this.vitalStatus,
this.vitalSignAppointmentNo,
this.episodeID,
this.actualDoctorRate,
this.clinicName,
this.complainExists,
this.doctorImageURL,
this.doctorNameObj,
this.doctorRate,
this.doctorSpeciality,
this.doctorTitle,
this.gender,
this.genderDescription,
this.iSAllowOnlineCheckedIN,
this.isActiveDoctor,
this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall,
this.isExecludeDoctor,
this.isFollowup,
this.isLiveCareAppointment,
this.isMedicalReportRequested,
this.isOnlineCheckedIN,
this.latitude,
this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription,
this.longitude,
this.nextAction,
this.noOfPatientsRate,
this.originalClinicID,
this.originalProjectID,
this.projectName,
this.qR,
this.remaniningHoursTocanPay,
this.sMSButtonVisable,
this.clinicID,
this.patientType,
this.visitType,
this.isInOutPatient,
});
AppoimentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
@ -176,7 +178,7 @@ class AppoimentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate'];
// doctorSpeciality = json['DoctorSpeciality'].cast<String>();
doctorSpeciality = json['DoctorSpeciality'].cast<String>();
doctorTitle = json['DoctorTitle'];
gender = json['Gender'];
genderDescription = json['GenderDescription'];
@ -191,18 +193,15 @@ class AppoimentAllHistoryResultList {
isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude'];
if (json['List_HIS_GetContactLensPerscription'] != null) {
listHISGetContactLensPerscription =
new List<ListHISGetContactLensPerscription>();
listHISGetContactLensPerscription = new List<ListHISGetContactLensPerscription>();
json['List_HIS_GetContactLensPerscription'].forEach((v) {
listHISGetContactLensPerscription
.add(new ListHISGetContactLensPerscription.fromJson(v));
listHISGetContactLensPerscription.add(new ListHISGetContactLensPerscription.fromJson(v));
});
}
if (json['List_HIS_GetGlassPerscription'] != null) {
listHISGetGlassPerscription = new List<ListHISGetGlassPerscription>();
json['List_HIS_GetGlassPerscription'].forEach((v) {
listHISGetGlassPerscription
.add(new ListHISGetGlassPerscription.fromJson(v));
listHISGetGlassPerscription.add(new ListHISGetGlassPerscription.fromJson(v));
});
}
longitude = json['Longitude'];
@ -218,6 +217,7 @@ class AppoimentAllHistoryResultList {
patientType = json['patientType'];
status = json['status'];
visitType = json['visitType'];
isInOutPatient = json['IsInOutPatient'];
}
Map<String, dynamic> toJson() {
@ -277,14 +277,10 @@ class AppoimentAllHistoryResultList {
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
data['Latitude'] = this.latitude;
if (this.listHISGetContactLensPerscription != null) {
data['List_HIS_GetContactLensPerscription'] = this
.listHISGetContactLensPerscription
.map((v) => v.toJson())
.toList();
data['List_HIS_GetContactLensPerscription'] = this.listHISGetContactLensPerscription.map((v) => v.toJson()).toList();
}
if (this.listHISGetGlassPerscription != null) {
data['List_HIS_GetGlassPerscription'] =
this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
}
data['Longitude'] = this.longitude;
data['NextAction'] = this.nextAction;
@ -325,23 +321,23 @@ class ListHISGetContactLensPerscription {
ListHISGetContactLensPerscription(
{this.setupId,
this.projectId,
this.patientType,
this.patientId,
this.encounterType,
this.encounterNo,
this.oDOS,
this.brand,
this.baseCurve,
this.power,
this.diameter,
this.oZ,
this.cT,
this.blend,
this.remarks,
this.status,
this.isActive,
this.createdOn});
this.projectId,
this.patientType,
this.patientId,
this.encounterType,
this.encounterNo,
this.oDOS,
this.brand,
this.baseCurve,
this.power,
this.diameter,
this.oZ,
this.cT,
this.blend,
this.remarks,
this.status,
this.isActive,
this.createdOn});
ListHISGetContactLensPerscription.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId'];
@ -415,28 +411,28 @@ class ListHISGetGlassPerscription {
ListHISGetGlassPerscription(
{this.projectID,
this.setupID,
this.patientId,
this.encounterType,
this.encounterNo,
this.visionType,
this.rightEyeSpherical,
this.rightEyeCylinder,
this.rightEyeAxis,
this.rightEyePrism,
this.rightEyeVA,
this.rightEyeRemarks,
this.leftEyeSpherical,
this.leftEyeCylinder,
this.leftEyeAxis,
this.leftEyePrism,
this.leftEyeVA,
this.leftEyeRemarks,
this.pD,
this.bVD,
this.status,
this.isActive,
this.createdOn});
this.setupID,
this.patientId,
this.encounterType,
this.encounterNo,
this.visionType,
this.rightEyeSpherical,
this.rightEyeCylinder,
this.rightEyeAxis,
this.rightEyePrism,
this.rightEyeVA,
this.rightEyeRemarks,
this.leftEyeSpherical,
this.leftEyeCylinder,
this.leftEyeAxis,
this.leftEyePrism,
this.leftEyeVA,
this.leftEyeRemarks,
this.pD,
this.bVD,
this.status,
this.isActive,
this.createdOn});
ListHISGetGlassPerscription.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID'];
@ -492,6 +488,3 @@ class ListHISGetGlassPerscription {
return data;
}
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart';
@ -56,11 +57,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel =
locator<PharmacyModuleViewModel>();
PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
LocationUtils locationUtils;
var weather = '--';
WeatherService _weatherService = WeatherService();
List<HmgServices> hmgServices = [];
@override
void initState() {
@ -71,9 +72,23 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
super.initState();
}
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin));
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
initialiseHmgServices(false);
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).alhabiServices,
@ -282,8 +297,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices();
},
imageLocation:
'assets/images/new-design/upcoming_icon_bottom_bar.png',
imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList,
),
if (projectViewModel.havePrivilege(42))

@ -26,9 +26,9 @@ import 'dart:math' as math;
class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model;
Function onPharmacyClick, onLoginClick;
Function onPharmacyClick, onLoginClick,onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick});
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick,this.onMedicalFileClick});
@override
_HomePageFragment2State createState() => _HomePageFragment2State();
@ -129,7 +129,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
),
FlatButton(
onPressed: () {
navigateTo(context, MedicalProfilePageNew());
widget.onMedicalFileClick();
// navigateTo(context, MedicalProfilePageNew());
},
child: Text(
TranslationBase.of(context).viewMedicalFile,

@ -25,9 +25,9 @@ import 'landing_page_pharmcy.dart';
class HomePage2 extends StatefulWidget {
final Function goToMyProfile;
Function onLoginClick;
Function onLoginClick, onMedicalFileClick;
HomePage2({Key key, this.goToMyProfile, this.onLoginClick});
HomePage2({Key key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick});
@override
_HomePageState2 createState() => _HomePageState2();
@ -58,6 +58,9 @@ class _HomePageState2 extends State<HomePage2> {
onPharmacyClick: () {
getPharmacyToken(model);
},
onMedicalFileClick: () {
widget.onMedicalFileClick();
},
)
],
),

@ -608,6 +608,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
onLoginClick: () {
login();
},
onMedicalFileClick: (){
changeCurrentTab(1);
},
),
MedicalProfilePageNew(),
Search(),

@ -106,6 +106,7 @@ class SliderView extends StatelessWidget {
color: Colors.white,
fontSize: 13,
letterSpacing: -0.39,
height: 1,
),
),
),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -16,119 +17,101 @@ class ClassesPage extends StatelessWidget {
final String projectName;
final int projectID;
const ClassesPage(
{Key key,
this.glassPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
const ClassesPage({Key key, this.glassPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key);
@override
Widget build(BuildContext context) {
return BaseView<EyeViewModel>(
builder: (_, model, w) => AppScaffold(
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15),
child: Column(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).rightEye,
fontSize: 23,
bold: true,
return SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20),
child: Column(
children: [
Card(
shape: cardRadius(12),
elevation: 1,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
TranslationBase.of(context).rightEye,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
getRow(TranslationBase.of(context).sphere,
'${glassPerscription.rightEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder,
'${glassPerscription.rightEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis,
'${glassPerscription.rightEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism,
'${glassPerscription.rightEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.rightEyeVA}', '-'),
],
),
),
SizedBox(
height: 17,
),
getRow(TranslationBase.of(context).sphere, '${glassPerscription.rightEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder, '${glassPerscription.rightEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis, '${glassPerscription.rightEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism, '${glassPerscription.rightEyePrism}', '-'),
getRow(TranslationBase.of(context).va, '${glassPerscription.rightEyeVA}', '-',isLast:true),
],
),
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).leftEye,
fontSize: 23,
bold: true,
),
),
),
SizedBox(
height: 12,
),
Card(
shape: cardRadius(12),
elevation: 1,
child: Container( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
TranslationBase.of(context).leftEye,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
getRow(TranslationBase.of(context).sphere,
'${glassPerscription.leftEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder,
'${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis,
'${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism,
'${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.leftEyeVA}', '-'),
],
),
),
SizedBox(
height: 17,
),
Container(
width: double.infinity,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
onTap: () {
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo,
projectName: projectName,
projectID: projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
textColor: Colors.white,
color: Colors.red[700],
icon: Icon(
Icons.email,
color: Colors.white,
),
),
)
],
getRow(TranslationBase.of(context).sphere, '${glassPerscription.leftEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder, '${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis, '${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism, '${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va, '${glassPerscription.leftEyeVA}', '-',isLast:true),
],
),
),
),
),
SizedBox(
height: 17,
),
// Container(
// width: double.infinity,
// child: SecondaryButton(
// label: TranslationBase.of(context).sendEmail,
// onTap: () {
// showConfirmMessage(context, () async {
// GifLoaderDialogUtils.showMyDialog(context);
// await model.sendGlassesPrescriptionEmail(appointmentNo: appointmentNo, projectName: projectName, projectID: projectID);
// GifLoaderDialogUtils.hideDialog(context);
// }, model.user.emailAddress);
// },
// textColor: Colors.white,
// color: Colors.red[700],
// icon: Icon(
// Icons.email,
// color: Colors.white,
// ),
// ),
// )
],
),
),
);
}
void showConfirmMessage(
BuildContext context, GestureTapCallback onTap, String email) {
void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
@ -140,31 +123,40 @@ class ClassesPage extends StatelessWidget {
);
}
Widget getRow(String title, String val1, String val2) => Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(flex: 4, child: Texts(title)),
Expanded(
flex: 2,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Texts(val1 == 'null' ? '-' : val1),
Texts(val2 != 'null' ? '-' : val2),
],
),
)
],
),
Divider()
],
Widget getRow(String title, String val1, String val2,{bool isLast=false}) => Padding(
padding: const EdgeInsets.only(left: 8,right: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(flex: 4, child: Text(title,style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),)),
Expanded(
flex: 2,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Text(
val1 == 'null' ? '-' : val1,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
Text(
val2 != 'null' ? '-' : val2,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),
)
],
),
),
);
isLast?Container(height: 4,): Divider()
],
),
);
}

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -18,120 +19,107 @@ class ContactLensPage extends StatelessWidget {
final String projectName;
final int projectID;
const ContactLensPage(
{Key key,
this.listHISGetContactLensPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
const ContactLensPage({Key key, this.listHISGetContactLensPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<EyeViewModel>(
builder: (_,model,w)=>
AppScaffold(
builder: (_, model, w) => AppScaffold(
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15),
margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20),
child: Column(
children: [
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).rightEye,
fontSize: 23,
bold: true,
Card(
shape: cardRadius(12),
elevation: 1,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
TranslationBase.of(context).rightEye,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
),
),
getRow(TranslationBase.of(context).brand,
'${listHISGetContactLensPerscription.brand}'),
getRow('B.C',
'${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power,
'${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter,
'${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true),
],
),
),
),
SizedBox(
height: 17,
height: 12,
),
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).leftEye,
fontSize: 23,
bold: true,
Card(
shape: cardRadius(12),
elevation: 1,
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
TranslationBase.of(context).leftEye,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
),
),
getRow(TranslationBase.of(context).brand,
'${listHISGetContactLensPerscription.brand}'),
getRow('B.C',
'${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power,
'${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter,
'${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true),
],
),
),
),
SizedBox(
height: 17,
),
if (projectViewModel.havePrivilege(15))
Container(
width: double.infinity,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
textColor: Colors.white,
color: Colors.red[700],
onTap: (){
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo,
projectName: projectName,
projectID: projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
icon: Icon(
Icons.email,
color: Colors.white,
),
),
)
// if (projectViewModel.havePrivilege(15))
// Container(
// width: double.infinity,
// child: SecondaryButton(
// label: TranslationBase.of(context).sendEmail,
// textColor: Colors.white,
// color: Colors.red[700],
// onTap: (){
// showConfirmMessage(context, () async {
// GifLoaderDialogUtils.showMyDialog(context);
// await model.sendContactLensPrescriptionEmail(
// appointmentNo: appointmentNo,
// projectName: projectName,
// projectID: projectID);
// GifLoaderDialogUtils.hideDialog(context);
// }, model.user.emailAddress);
// },
// icon: Icon(
// Icons.email,
// color: Colors.white,
// ),
// ),
// )
],
),
),
@ -140,35 +128,48 @@ class ContactLensPage extends StatelessWidget {
);
}
Widget getRow(String title, String val1) => Padding(
padding: const EdgeInsets.all(8.0),
Widget getRow(String title, String val1, {bool isLast = false}) => Padding(
padding: const EdgeInsets.only(left: 8, right: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(flex: 4, child: Texts(title)),
Expanded(
flex: 2,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(val1 == 'null' ? '-' : val1),
],
),
)
],
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Expanded(
flex: 4,
child: Text(
title,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
)),
Expanded(
flex: 2,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
val1 == 'null' ? '-' : val1,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),
)
],
),
),
Divider()
isLast
? Container(
height: 4,
)
: Divider()
],
),
);
void showConfirmMessage(
BuildContext context, GestureTapCallback onTap, String email) {
void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(

@ -3,12 +3,25 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'ClassesPage.dart';
import 'ContactLensPage.dart';
@ -16,21 +29,26 @@ import 'ContactLensPage.dart';
class EyeHomePage extends StatefulWidget {
final AppoimentAllHistoryResultList appointmentAllHistoryResultList;
const EyeHomePage({Key key, this.appointmentAllHistoryResultList})
: super(key: key);
const EyeHomePage({Key key, this.appointmentAllHistoryResultList}) : super(key: key);
@override
_EyeHomePageState createState() => _EyeHomePageState();
}
class _EyeHomePageState extends State<EyeHomePage>
with SingleTickerProviderStateMixin {
class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStateMixin {
TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@override
void initState() {
super.initState();
_tabController = TabController(length: 2, vsync: this);
_tabController.addListener(() {
setState(() {
});
});
}
@override
@ -41,76 +59,97 @@ class _EyeHomePageState extends State<EyeHomePage>
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).measurements,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(60.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<EyeViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
showNewAppBarTitle: true,
showNewAppBar: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
body: Column(
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
widget.appointmentAllHistoryResultList.doctorImageURL,
widget.appointmentAllHistoryResultList.doctorSpeciality,
"",
widget.appointmentAllHistoryResultList.projectName,
DateUtil.convertStringToDate(widget.appointmentAllHistoryResultList.appointmentDate),
widget.appointmentAllHistoryResultList.startTime.substring(0, 5),
null,
widget.appointmentAllHistoryResultList.doctorRate,
widget.appointmentAllHistoryResultList.actualDoctorRate,
widget.appointmentAllHistoryResultList.noOfPatientsRate,
"",
//model.user.emailAddress,
),
Center(
child: Container(
height: 55.0,
margin: EdgeInsets.only(left: 20,right: 20,top: 15),
color: Colors.white,
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(TranslationBase.of(context).classes),
isNeedToShowButton: _tabController.index==0?true:projectViewModel.havePrivilege(15),
showConfirmMessageDialog: true,
onRatingAndReviewTap: getDoctorRatingsDetails,
onTap: () {
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendGlassesPrescriptionEmail(
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
),
Container(
height: 45.0,
width: double.infinity,
child: Center(
child: TabBar(
isScrollable: false,
controller: _tabController,
indicatorWeight: 2.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
// width: double.infinity,
child: Center(
child: Text(
TranslationBase.of(context).classes,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.36,
),
),
Container(
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(TranslationBase.of(context).contactLens),
),
),
Container(
// width: double.infinity,
child: Center(
child: Text(
TranslationBase.of(context).contactLens,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.36,
),
),
],
),
),
),
],
),
),
],
),
),
body: Column(
children: <Widget>[
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
controller: _tabController,
children: <Widget>[
ClassesPage(
glassPerscription: widget.appointmentAllHistoryResultList
.listHISGetGlassPerscription[0],
glassPerscription: widget.appointmentAllHistoryResultList.listHISGetGlassPerscription[0],
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID,
@ -129,4 +168,233 @@ class _EyeHomePageState extends State<EyeHomePage>
),
);
}
void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: email,
onTapSendEmail: () {
onTap();
},
),
);
}
void getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appointmentAllHistoryResultList.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
doctorDetailsList.clear();
res['DoctorRatingDetailsList'].forEach((v) {
doctorDetailsList.add(new DoctorRateDetails.fromJson(v));
});
showRatingDialog(doctorDetailsList);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 400.0,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white,
child: Column(
children: [
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(this.widget.appointmentAllHistoryResultList.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating: this.widget.appointmentAllHistoryResultList.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(this.widget.appointmentAllHistoryResultList.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews,
style: TextStyle(fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
),
),
Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 40.0,
child: RaisedButton(
elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
),
),
],
),
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.widget.appointmentAllHistoryResultList.noOfPatientsRate) * 100;
return width;
}
}

@ -1,9 +1,13 @@
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/MyAppointments/models/AppointmentType.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/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -24,97 +28,69 @@ class EyeMeasurementsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.all(8),
child: Column(
children: [
...List.generate(
model.appointmentFilter.length,
(index) => AppExpandableNotifier(
child: Column(
children: [
ListView.separated(
physics: NeverScrollableScrollPhysics(),
shrinkWrap: true,
padding: EdgeInsets.only(top: 12),
separatorBuilder: (context, index) {
return Container(
height: 1,
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: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model.appointmentFilter[index]
.appointmentAllHistoryResultList
.map((appointment) {
return InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: EyeHomePage(
appointmentAllHistoryResultList: appointment,
),
),
);
},
child: Container(
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.white,
border: Border.all(color: Colors.grey),
),
child: Row(
children: [
Expanded(
flex: 1,
child: LargeAvatar(
name: appointment.doctorNameObj,
url: appointment.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointment.doctorNameObj,
bold: true,
),
Texts(
appointment.clinicName,
variant: 'caption3',
),
Texts(
DateUtil.getMonthDayYearDateFormatted(
appointment.bookDate),
variant: 'caption3',
),
StarRating(
totalAverage: appointment
.actualDoctorRate
.toDouble(),
forceStars: true),
],
),
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,
),
),
Icon(
projectViewModel.isArabic
? Icons.arrow_forward_ios
: Icons.arrow_back_ios,
color: Colors.grey,
size: 18,
)
],
),
),
);
}).toList(),
),
),
),
],
),
),
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,
),
],
),
),
),

@ -87,15 +87,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.width / 2.8,
child: Row(
children: [
showMass(context, "Underweight", "<18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
showMass(context, "Underweight", "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
mWidth(12),
showMass(context, "Normal", "18.5-24.9", (double.parse(mode.bodyMax) >= 18.5 || double.parse(mode.bodyMax) >= 24.6) ? Colors.red : Colors.black, 6),
showMass(context, "Normal", "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
mWidth(12),
showMass(context, "Overweight", "25-29.9", (double.parse(mode.bodyMax) >= 25 || double.parse(mode.bodyMax) >= 29.9) ? Colors.red : Colors.black, 4),
showMass(context, "Overweight", "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
mWidth(12),
showMass(context, "Obese", "30-34.9", (double.parse(mode.bodyMax) >= 30 || double.parse(mode.bodyMax) >= 34.9) ? Colors.red : Colors.black, 2),
showMass(context, "Obese", "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
mWidth(12),
showMass(context, "Extreme Obese", ">35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
showMass(context, "Extreme Obese", "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
],
),
),

@ -256,6 +256,7 @@ class _TimeLineViewState extends State<TimeLineView> {
color: Colors.white,
fontSize: 12,
letterSpacing: -0.33,
height: 1,
),
),
),

Loading…
Cancel
Save