eye measurment new design

merge-update-with-lab-changes
Mirza.Shafique 5 years ago
parent 3f0d8626e7
commit f577905dcb

@ -13,8 +13,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
// const BASE_URL = 'https://uat.hmgwebservices.com/'; const BASE_URL = 'https://uat.hmgwebservices.com/';
const BASE_URL = 'https://hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -66,74 +66,76 @@ class AppoimentAllHistoryResultList {
String qR; String qR;
int remaniningHoursTocanPay; int remaniningHoursTocanPay;
bool sMSButtonVisable; bool sMSButtonVisable;
bool isInOutPatient;
AppoimentAllHistoryResultList( AppoimentAllHistoryResultList({
{this.setupID, this.setupID,
this.projectID, this.projectID,
this.appointmentNo, this.appointmentNo,
this.appointmentDate, this.appointmentDate,
this.appointmentDateN, this.appointmentDateN,
this.appointmentType, this.appointmentType,
this.bookDate, this.bookDate,
this.patientID, this.patientID,
this.doctorID, this.doctorID,
this.endDate, this.endDate,
this.startTime, this.startTime,
this.endTime, this.endTime,
this.status, this.status,
this.visitFor, this.visitFor,
this.patientStatusType, this.patientStatusType,
this.companyID, this.companyID,
this.bookedBy, this.bookedBy,
this.bookedOn, this.bookedOn,
this.confirmedBy, this.confirmedBy,
this.confirmedOn, this.confirmedOn,
this.arrivalChangedBy, this.arrivalChangedBy,
this.arrivedOn, this.arrivedOn,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.statusDesc, this.statusDesc,
this.statusDescN, this.statusDescN,
this.vitalStatus, this.vitalStatus,
this.vitalSignAppointmentNo, this.vitalSignAppointmentNo,
this.episodeID, this.episodeID,
this.actualDoctorRate, this.actualDoctorRate,
this.clinicName, this.clinicName,
this.complainExists, this.complainExists,
this.doctorImageURL, this.doctorImageURL,
this.doctorNameObj, this.doctorNameObj,
this.doctorRate, this.doctorRate,
this.doctorSpeciality, this.doctorSpeciality,
this.doctorTitle, this.doctorTitle,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.iSAllowOnlineCheckedIN, this.iSAllowOnlineCheckedIN,
this.isActiveDoctor, this.isActiveDoctor,
this.isActiveDoctorProfile, this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isExecludeDoctor, this.isExecludeDoctor,
this.isFollowup, this.isFollowup,
this.isLiveCareAppointment, this.isLiveCareAppointment,
this.isMedicalReportRequested, this.isMedicalReportRequested,
this.isOnlineCheckedIN, this.isOnlineCheckedIN,
this.latitude, this.latitude,
this.listHISGetContactLensPerscription, this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription, this.listHISGetGlassPerscription,
this.longitude, this.longitude,
this.nextAction, this.nextAction,
this.noOfPatientsRate, this.noOfPatientsRate,
this.originalClinicID, this.originalClinicID,
this.originalProjectID, this.originalProjectID,
this.projectName, this.projectName,
this.qR, this.qR,
this.remaniningHoursTocanPay, this.remaniningHoursTocanPay,
this.sMSButtonVisable, this.sMSButtonVisable,
this.clinicID, this.clinicID,
this.patientType, this.patientType,
this.visitType,
this.visitType}); this.isInOutPatient,
});
AppoimentAllHistoryResultList.fromJson(Map<String, dynamic> json) { AppoimentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -176,7 +178,7 @@ class AppoimentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj']; doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate']; doctorRate = json['DoctorRate'];
// doctorSpeciality = json['DoctorSpeciality'].cast<String>(); doctorSpeciality = json['DoctorSpeciality'].cast<String>();
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
gender = json['Gender']; gender = json['Gender'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
@ -191,18 +193,15 @@ class AppoimentAllHistoryResultList {
isOnlineCheckedIN = json['IsOnlineCheckedIN']; isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude']; latitude = json['Latitude'];
if (json['List_HIS_GetContactLensPerscription'] != null) { if (json['List_HIS_GetContactLensPerscription'] != null) {
listHISGetContactLensPerscription = listHISGetContactLensPerscription = new List<ListHISGetContactLensPerscription>();
new List<ListHISGetContactLensPerscription>();
json['List_HIS_GetContactLensPerscription'].forEach((v) { json['List_HIS_GetContactLensPerscription'].forEach((v) {
listHISGetContactLensPerscription listHISGetContactLensPerscription.add(new ListHISGetContactLensPerscription.fromJson(v));
.add(new ListHISGetContactLensPerscription.fromJson(v));
}); });
} }
if (json['List_HIS_GetGlassPerscription'] != null) { if (json['List_HIS_GetGlassPerscription'] != null) {
listHISGetGlassPerscription = new List<ListHISGetGlassPerscription>(); listHISGetGlassPerscription = new List<ListHISGetGlassPerscription>();
json['List_HIS_GetGlassPerscription'].forEach((v) { json['List_HIS_GetGlassPerscription'].forEach((v) {
listHISGetGlassPerscription listHISGetGlassPerscription.add(new ListHISGetGlassPerscription.fromJson(v));
.add(new ListHISGetGlassPerscription.fromJson(v));
}); });
} }
longitude = json['Longitude']; longitude = json['Longitude'];
@ -218,6 +217,7 @@ class AppoimentAllHistoryResultList {
patientType = json['patientType']; patientType = json['patientType'];
status = json['status']; status = json['status'];
visitType = json['visitType']; visitType = json['visitType'];
isInOutPatient = json['IsInOutPatient'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -277,14 +277,10 @@ class AppoimentAllHistoryResultList {
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
data['Latitude'] = this.latitude; data['Latitude'] = this.latitude;
if (this.listHISGetContactLensPerscription != null) { if (this.listHISGetContactLensPerscription != null) {
data['List_HIS_GetContactLensPerscription'] = this data['List_HIS_GetContactLensPerscription'] = this.listHISGetContactLensPerscription.map((v) => v.toJson()).toList();
.listHISGetContactLensPerscription
.map((v) => v.toJson())
.toList();
} }
if (this.listHISGetGlassPerscription != null) { if (this.listHISGetGlassPerscription != null) {
data['List_HIS_GetGlassPerscription'] = data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
} }
data['Longitude'] = this.longitude; data['Longitude'] = this.longitude;
data['NextAction'] = this.nextAction; data['NextAction'] = this.nextAction;
@ -325,23 +321,23 @@ class ListHISGetContactLensPerscription {
ListHISGetContactLensPerscription( ListHISGetContactLensPerscription(
{this.setupId, {this.setupId,
this.projectId, this.projectId,
this.patientType, this.patientType,
this.patientId, this.patientId,
this.encounterType, this.encounterType,
this.encounterNo, this.encounterNo,
this.oDOS, this.oDOS,
this.brand, this.brand,
this.baseCurve, this.baseCurve,
this.power, this.power,
this.diameter, this.diameter,
this.oZ, this.oZ,
this.cT, this.cT,
this.blend, this.blend,
this.remarks, this.remarks,
this.status, this.status,
this.isActive, this.isActive,
this.createdOn}); this.createdOn});
ListHISGetContactLensPerscription.fromJson(Map<String, dynamic> json) { ListHISGetContactLensPerscription.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId']; setupId = json['SetupId'];
@ -415,28 +411,28 @@ class ListHISGetGlassPerscription {
ListHISGetGlassPerscription( ListHISGetGlassPerscription(
{this.projectID, {this.projectID,
this.setupID, this.setupID,
this.patientId, this.patientId,
this.encounterType, this.encounterType,
this.encounterNo, this.encounterNo,
this.visionType, this.visionType,
this.rightEyeSpherical, this.rightEyeSpherical,
this.rightEyeCylinder, this.rightEyeCylinder,
this.rightEyeAxis, this.rightEyeAxis,
this.rightEyePrism, this.rightEyePrism,
this.rightEyeVA, this.rightEyeVA,
this.rightEyeRemarks, this.rightEyeRemarks,
this.leftEyeSpherical, this.leftEyeSpherical,
this.leftEyeCylinder, this.leftEyeCylinder,
this.leftEyeAxis, this.leftEyeAxis,
this.leftEyePrism, this.leftEyePrism,
this.leftEyeVA, this.leftEyeVA,
this.leftEyeRemarks, this.leftEyeRemarks,
this.pD, this.pD,
this.bVD, this.bVD,
this.status, this.status,
this.isActive, this.isActive,
this.createdOn}); this.createdOn});
ListHISGetGlassPerscription.fromJson(Map<String, dynamic> json) { ListHISGetGlassPerscription.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -492,6 +488,3 @@ class ListHISGetGlassPerscription {
return data; 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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.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/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart';
@ -56,11 +57,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; LocationUtils locationUtils;
var weather = '--'; var weather = '--';
WeatherService _weatherService = WeatherService(); WeatherService _weatherService = WeatherService();
List<HmgServices> hmgServices = [];
@override @override
void initState() { void initState() {
@ -71,9 +72,23 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
super.initState(); 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
initialiseHmgServices(false);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).alhabiServices, appBarTitle: TranslationBase.of(context).alhabiServices,
@ -282,8 +297,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context); Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices(); LandingPage.shared.switchToDoFromHMGServices();
}, },
imageLocation: imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
if (projectViewModel.havePrivilege(42)) if (projectViewModel.havePrivilege(42))

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

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

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

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

@ -3,12 +3,25 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.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/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/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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'ClassesPage.dart'; import 'ClassesPage.dart';
import 'ContactLensPage.dart'; import 'ContactLensPage.dart';
@ -16,21 +29,26 @@ import 'ContactLensPage.dart';
class EyeHomePage extends StatefulWidget { class EyeHomePage extends StatefulWidget {
final AppoimentAllHistoryResultList appointmentAllHistoryResultList; final AppoimentAllHistoryResultList appointmentAllHistoryResultList;
const EyeHomePage({Key key, this.appointmentAllHistoryResultList}) const EyeHomePage({Key key, this.appointmentAllHistoryResultList}) : super(key: key);
: super(key: key);
@override @override
_EyeHomePageState createState() => _EyeHomePageState(); _EyeHomePageState createState() => _EyeHomePageState();
} }
class _EyeHomePageState extends State<EyeHomePage> class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
_tabController.addListener(() {
setState(() {
});
});
} }
@override @override
@ -41,76 +59,97 @@ class _EyeHomePageState extends State<EyeHomePage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( ProjectViewModel projectViewModel = Provider.of(context);
isShowAppBar: true, return BaseView<EyeViewModel>(
isShowDecPage: false, builder: (_, model, w) => AppScaffold(
appBarTitle: TranslationBase.of(context).measurements, isShowAppBar: true,
body: Scaffold( isShowDecPage: false,
extendBodyBehindAppBar: true, appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
appBar: PreferredSize( showNewAppBarTitle: true,
preferredSize: Size.fromHeight(60.0), showNewAppBar: true,
child: Stack( backgroundColor: CustomColors.appBackgroudGreyColor,
children: <Widget>[ body: Column(
Positioned( children: <Widget>[
bottom: 1, DoctorHeader(
left: 0, headerModel: HeaderModel(
right: 0, widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
child: BackdropFilter( widget.appointmentAllHistoryResultList.doctorImageURL,
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), widget.appointmentAllHistoryResultList.doctorSpeciality,
child: Container( "",
color: Theme.of(context) widget.appointmentAllHistoryResultList.projectName,
.scaffoldBackgroundColor DateUtil.convertStringToDate(widget.appointmentAllHistoryResultList.appointmentDate),
.withOpacity(0.8), widget.appointmentAllHistoryResultList.startTime.substring(0, 5),
height: 70.0, null,
), widget.appointmentAllHistoryResultList.doctorRate,
), widget.appointmentAllHistoryResultList.actualDoctorRate,
widget.appointmentAllHistoryResultList.noOfPatientsRate,
"",
//model.user.emailAddress,
), ),
Center( isNeedToShowButton: _tabController.index==0?true:projectViewModel.havePrivilege(15),
child: Container( showConfirmMessageDialog: true,
height: 55.0, onRatingAndReviewTap: getDoctorRatingsDetails,
margin: EdgeInsets.only(left: 20,right: 20,top: 15), onTap: () {
color: Colors.white, showConfirmMessage(context, () async {
child: Center( GifLoaderDialogUtils.showMyDialog(context);
child: TabBar( await model.sendGlassesPrescriptionEmail(
isScrollable: true, appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
controller: _tabController, projectName: widget.appointmentAllHistoryResultList.projectName,
indicatorWeight: 5.0, projectID: widget.appointmentAllHistoryResultList.projectID);
indicatorSize: TabBarIndicatorSize.tab, GifLoaderDialogUtils.hideDialog(context);
labelColor: Theme.of(context).primaryColor, }, model.user.emailAddress);
labelPadding: },
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), ),
unselectedLabelColor: Colors.grey[800], Container(
tabs: [ height: 45.0,
Container( width: double.infinity,
width: MediaQuery.of(context).size.width * 0.40, child: Center(
child: Center( child: TabBar(
child: Texts(TranslationBase.of(context).classes), 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( Container(
child: Texts(TranslationBase.of(context).contactLens), // 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( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
ClassesPage( ClassesPage(
glassPerscription: widget.appointmentAllHistoryResultList glassPerscription: widget.appointmentAllHistoryResultList.listHISGetGlassPerscription[0],
.listHISGetGlassPerscription[0],
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo, appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName, projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID, 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/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.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/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -24,97 +28,69 @@ class EyeMeasurementsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
appBarTitle: TranslationBase.of(context).eyeMeasurements, appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Column(
margin: EdgeInsets.all(8), children: [
child: Column( ListView.separated(
children: [ physics: NeverScrollableScrollPhysics(),
...List.generate( shrinkWrap: true,
model.appointmentFilter.length, padding: EdgeInsets.only(top: 12),
(index) => AppExpandableNotifier( 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, title: model.appointmentFilter[index].filterName,
bodyWidget: Column( bodyWidget: ListView.separated(
crossAxisAlignment: CrossAxisAlignment.start, shrinkWrap: true,
mainAxisAlignment: MainAxisAlignment.spaceBetween, physics: NeverScrollableScrollPhysics(),
children: model.appointmentFilter[index] padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
.appointmentAllHistoryResultList itemBuilder: (context, _index) {
.map((appointment) { AppoimentAllHistoryResultList _appointmentResult = _appointmentAllHistoryResultList[_index];
return InkWell(
onTap: () { return DoctorCard(
Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: EyeHomePage( page: EyeHomePage(
appointmentAllHistoryResultList: appointment, appointmentAllHistoryResultList: _appointmentResult,
),
),
);
},
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),
],
),
), ),
), ),
Icon( ),
projectViewModel.isArabic isInOutPatient: _appointmentResult.isInOutPatient,
? Icons.arrow_forward_ios name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
: Icons.arrow_back_ios, // billNo: "appointmentResult.do",
color: Colors.grey, profileUrl: _appointmentResult.doctorImageURL,
size: 18, subName: _appointmentResult.clinicName,
) isLiveCareAppointment: _appointmentResult.isLiveCareAppointment,
], date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate),
), isSortByClinic: false,
), rating: _appointmentResult.actualDoctorRate + 0.0,
); // appointmentTime: _appointmentResult.startTime.substring(0, 5),
}).toList(), // 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, height: MediaQuery.of(context).size.width / 2.8,
child: Row( child: Row(
children: [ 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), 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), 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), 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), 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, color: Colors.white,
fontSize: 12, fontSize: 12,
letterSpacing: -0.33, letterSpacing: -0.33,
height: 1,
), ),
), ),
), ),

Loading…
Cancel
Save