diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 77545340..2a89b765 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -68,6 +68,7 @@ class BaseAppClient { body['LanguageID'] = 2; body['stamp'] = STAMP; + // if(!body.containsKey("IPAdress")) body['IPAdress'] = IP_ADDRESS; body['VersionID'] = VERSION_ID; body['Channel'] = CHANNEL; @@ -85,6 +86,9 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); + String bodyData= json.encode(body); + var asd=""; + if (await Helpers.checkConnection()) { final response = await http.post(url, @@ -148,7 +152,7 @@ class BaseAppClient { : SETUP_ID; } - body['VersionID'] = VERSION_ID; + body['VersionID'] = 6.3; body['Channel'] = CHANNEL; body['LanguageID'] = languageID == 'ar' ? 1 : 2; diff --git a/lib/config/config.dart b/lib/config/config.dart index 538aed37..59929f45 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -121,7 +121,7 @@ const GET_DASHBOARD = const GET_SICKLEAVE_STATISTIC = 'Services/DoctorApplication.svc/REST/PreSickLeaveStatistics'; const ARRIVED_PATIENT_URL = - 'Services/DoctorApplication.svc/REST/PatientArrivalList​'; + 'Services/DoctorApplication.svc/REST/PatientArrivalList'; const ADD_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/PostSickLeave'; const GET_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/GetAllSickLeaves'; const EXTEND_SICK_LEAVE = 'Services/DoctorApplication.svc/REST/ExtendSickLeave'; diff --git a/lib/core/model/medical_file_request_model.dart b/lib/core/model/medical_file_request_model.dart index c5a40bb7..8703141a 100644 --- a/lib/core/model/medical_file_request_model.dart +++ b/lib/core/model/medical_file_request_model.dart @@ -1,8 +1,9 @@ class MedicalFileRequestModel { int patientMRN; String vidaAuthTokenID; + String iPAdress; - MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID}); + MedicalFileRequestModel({this.patientMRN, this.vidaAuthTokenID,this.iPAdress}); MedicalFileRequestModel.fromJson(Map json) { patientMRN = json['PatientMRN']; @@ -13,6 +14,7 @@ class MedicalFileRequestModel { final Map data = new Map(); data['PatientMRN'] = this.patientMRN; data['VidaAuthTokenID'] = this.vidaAuthTokenID; + data['IPAdress'] = this.iPAdress; return data; } } diff --git a/lib/core/service/InsuranceCardService.dart b/lib/core/service/InsuranceCardService.dart index 43c0e811..de7ee433 100644 --- a/lib/core/service/InsuranceCardService.dart +++ b/lib/core/service/InsuranceCardService.dart @@ -15,18 +15,18 @@ class InsuranceCardService extends BaseService { List get insuranceApproval => _insuranceApproval; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo , int projectId}) async { hasError = false; // _cardList.clear(); - if (appointmentNo != null) { - _insuranceApprovalModel.appointmentNo = appointmentNo; - _insuranceApprovalModel.eXuldAPPNO = null; - _insuranceApprovalModel.projectID = null; - } else { + // if (appointmentNo != null) { + // _insuranceApprovalModel.appointmentNo = appointmentNo; + // _insuranceApprovalModel.eXuldAPPNO = null; + // _insuranceApprovalModel.projectID = projectId; + // } else { _insuranceApprovalModel.appointmentNo = null; _insuranceApprovalModel.eXuldAPPNO = 0; _insuranceApprovalModel.projectID = 0; - } + // } await baseAppClient.postPatient(GET_PAtIENTS_INSURANCE_APPROVALS, patient: patient, diff --git a/lib/core/service/medical_file_service.dart b/lib/core/service/medical_file_service.dart index f1ab6dcd..fb6c2449 100644 --- a/lib/core/service/medical_file_service.dart +++ b/lib/core/service/medical_file_service.dart @@ -16,6 +16,7 @@ class MedicalFileService extends BaseService { Future getMedicalFile({int mrn}) async { _fileRequestModel = MedicalFileRequestModel(patientMRN: mrn); + _fileRequestModel.iPAdress = "9.9.9.9"; hasError = false; _medicalFileList.clear(); await baseAppClient.post(GET_MEDICAL_FILE, diff --git a/lib/core/viewModel/InsuranceViewModel.dart b/lib/core/viewModel/InsuranceViewModel.dart index b08469ef..a0b51d20 100644 --- a/lib/core/viewModel/InsuranceViewModel.dart +++ b/lib/core/viewModel/InsuranceViewModel.dart @@ -14,12 +14,12 @@ class InsuranceViewModel extends BaseViewModel{ List get insuranceApproval => _insuranceCardService.insuranceApproval; - Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo}) async { + Future getInsuranceApproval(PatiantInformtion patient,{int appointmentNo, int projectId}) async { error = ""; setState(ViewState.Busy); if (appointmentNo != null) await _insuranceCardService.getInsuranceApproval(patient, - appointmentNo: appointmentNo); + appointmentNo: appointmentNo,projectId: projectId); else await _insuranceCardService.getInsuranceApproval(patient); if (_insuranceCardService.hasError) { diff --git a/lib/screens/doctor/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_repaly_chat.dart index 35718793..d183406b 100644 --- a/lib/screens/doctor/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_repaly_chat.dart @@ -43,11 +43,11 @@ class DoctorReplayChat extends StatelessWidget { decoration: BoxDecoration( color: Colors.white, ), - height: 150, + height: 115, child: Container( padding: EdgeInsets.only( - left: 10, right: 10, bottom: 10), - margin: EdgeInsets.only(top: 50), + left: 10, right: 10), + margin: EdgeInsets.only(top: 40), child: Column( children: [ Row( @@ -300,31 +300,44 @@ class DoctorReplayChat extends StatelessWidget { ), ), bottomSheet: Container( - child:TextFields( - hasLabelText: msgController.text != '' - ? true - : false, - showLabelText: false, - hintText: TranslationBase - .of(context) - .typeHereToReply, - fontSize: 13.5, - suffixIcon: FontAwesomeIcons.arrowRight, - suffixIconColor: Colors.green, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 50, - minLines: 3, - controller: msgController, - validator: (value) { - if (value == null || value == "") - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - height: MediaQuery.of(context).size.height * 0.1, - ), + width: double.infinity, + // height: MediaQuery.of(context).size.height * 0.12, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + FractionallySizedBox( + child: Container( + child: TextFields( + borderRadius: 0, + hasLabelText: msgController.text != '' + ? true + : false, + showLabelText: false, + hintText: "\n"+TranslationBase + .of(context) + .typeHereToReply, + fontSize: 13.5, + + suffixIcon: FontAwesomeIcons.arrowRight, + suffixIconColor: Colors.green, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 50, + minLines: 3, + controller: msgController, + validator: (value) { + if (value == null || value == "") + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), + + ), + ), + ], + ), + ) )); } } diff --git a/lib/screens/doctor/doctor_reply_screen.dart b/lib/screens/doctor/doctor_reply_screen.dart index 62d46d5e..2f5549fb 100644 --- a/lib/screens/doctor/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_reply_screen.dart @@ -39,14 +39,15 @@ class DoctorReplyScreen extends StatelessWidget { children: model.listDoctorWorkingHoursTable.map((reply) { return InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (BuildContext context) => - DoctorReplayChat(reply: reply))); - }, - child: DoctorReplyWidget(reply: reply)); + onTap: () { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (BuildContext context) => + // DoctorReplayChat(reply: reply))); + }, + child: DoctorReplyWidget(reply: reply), + ); }).toList(), ) ], diff --git a/lib/screens/patients/insurance_approval_screen_patient.dart b/lib/screens/patients/insurance_approval_screen_patient.dart index 0eb3da80..3f0bfedf 100644 --- a/lib/screens/patients/insurance_approval_screen_patient.dart +++ b/lib/screens/patients/insurance_approval_screen_patient.dart @@ -42,7 +42,7 @@ class _InsuranceApprovalScreenNewState return BaseView( onModelReady: patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, - appointmentNo: patient.appointmentNo) + appointmentNo: patient.appointmentNo,projectId: patient.projectId) : (model) => model.getInsuranceApproval(patient), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( @@ -147,7 +147,7 @@ class _InsuranceApprovalScreenNewState .toString(), isPrescriptions: true, approvalStatus: model.insuranceApproval[index] - .approvalDetails.status, + .approvalDetails?.status??'', ), ), ), diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index 98daef73..8903b704 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -37,7 +37,7 @@ class _InsuranceApprovalsDetailsState extends State { return BaseView( onModelReady: patient.appointmentNo != null ? (model) => model.getInsuranceApproval(patient, - appointmentNo: patient.appointmentNo) + appointmentNo: patient.appointmentNo,projectId: patient.projectId) : (model) => model.getInsuranceApproval(patient), builder: (BuildContext context, InsuranceViewModel model, Widget child) => AppScaffold( @@ -93,14 +93,12 @@ class _InsuranceApprovalsDetailsState extends State { Row( children: [ Texts( - model.insuranceApproval[indexInsurance] - .approvalDetails.status, + model.insuranceApproval[indexInsurance].approvalDetails!=null? + model.insuranceApproval[indexInsurance].approvalDetails.status ??"":"", color: - model.insuranceApproval[indexInsurance] - .approvalDetails.status == - "Approved" - ? Color(0xff359846) - : Color(0xffD02127), + model.insuranceApproval[indexInsurance].approvalDetails!=null? + "${model.insuranceApproval[indexInsurance].approvalDetails.status}" + == "Approved" ? Color(0xff359846) : Color(0xffD02127): Color(0xffD02127), ), ], ), @@ -210,9 +208,7 @@ class _InsuranceApprovalsDetailsState extends State { Texts('Sample') ], ), - SizedBox( - height: 25.0, - ), + Row( children: [ Texts( @@ -315,8 +311,8 @@ class _InsuranceApprovalsDetailsState extends State { child: Texts(model .insuranceApproval[ indexInsurance] - .approvalDetails - .procedureName), + ?.approvalDetails + ?.procedureName??""), ), Container( height: MediaQuery.of(context) @@ -330,8 +326,8 @@ class _InsuranceApprovalsDetailsState extends State { child: Texts(model .insuranceApproval[ indexInsurance] - .approvalDetails - .status), + ?.approvalDetails + ?.status??""), ), Container( height: MediaQuery.of(context) @@ -345,8 +341,8 @@ class _InsuranceApprovalsDetailsState extends State { child: Texts(model .insuranceApproval[ indexInsurance] - .approvalDetails - .isInvoicedDesc), + ?.approvalDetails + ?.isInvoicedDesc??""), ), ], ), diff --git a/lib/screens/patients/patients_screen.dart b/lib/screens/patients/patients_screen.dart index 286f206d..28e4434f 100644 --- a/lib/screens/patients/patients_screen.dart +++ b/lib/screens/patients/patients_screen.dart @@ -167,15 +167,23 @@ class _PatientsScreenState extends State { var strExist = str.length > 0 ? true : false; if (true) { List filterDate = []; - + String patiantAppointment = ""; for (var i = 0; i < responseModelList2.length; i++) { - String patiantAppointment = - convertDateFormat(responseModelList[i].appointmentDate); + try { + if (responseModelList[i].appointmentDate == "") { + patiantAppointment = responseModelList[i].arrivedOn; + } else { + patiantAppointment = + convertDateFormat(responseModelList[i].appointmentDate); + } - String dateAppointment = checkDate(patiantAppointment); + String dateAppointment = checkDate(patiantAppointment); - if (dateAppointment.contains(str)) { - filterDate.add(responseModelList[i]); + if (dateAppointment.contains(str) || str == 'All') { + filterDate.add(responseModelList[i]); + } + } catch (e) { + print(e); } } @@ -441,17 +449,18 @@ class _PatientsScreenState extends State { }, )), Padding( - padding: EdgeInsets.only( - top: MediaQuery.of(context) - .size - .height * - 0.03), - child: SERVICES_PATIANT2[ - int.parse(patientType)] == - "List_MyOutPatient" - ? _locationBar(context) - : Container(), - ), + padding: EdgeInsets.only( + top: MediaQuery.of(context) + .size + .height * + 0.03), + child: _locationBar(context) + // child: SERVICES_PATIANT2[ + // int.parse(patientType)] == + // "List_MyOutPatient" + // ? _locationBar(context) + // : Container(), + ), // Row( // mainAxisAlignment: // MainAxisAlignment.spaceEvenly, diff --git a/lib/screens/patients/profile/radiology/radiology_details_page.dart b/lib/screens/patients/profile/radiology/radiology_details_page.dart index 6b54dec7..308f8536 100644 --- a/lib/screens/patients/profile/radiology/radiology_details_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_details_page.dart @@ -19,7 +19,13 @@ class RadiologyDetailsPage extends StatelessWidget { final PatiantInformtion patient; final String patientType; final String arrivalType; - RadiologyDetailsPage({Key key, this.finalRadiology, this.patient, this.patientType, this.arrivalType}); + + RadiologyDetailsPage( + {Key key, + this.finalRadiology, + this.patient, + this.patientType, + this.arrivalType}); @override Widget build(BuildContext context) { @@ -30,66 +36,72 @@ class RadiologyDetailsPage extends StatelessWidget { lineItem: finalRadiology.invoiceLineItemNo, invoiceNo: finalRadiology.invoiceNo), builder: (_, model, widget) => AppScaffold( - appBar: PatientProfileHeaderWhitAppointmentAppBar( - patient: patient, - patientType: patientType??"0", - arrivalType: arrivalType??"0", - orderNo: finalRadiology.orderNo.toString(), - appointmentDate:finalRadiology.orderDate, - doctorName: finalRadiology.doctorName, - profileUrl: finalRadiology.doctorImageURL, - invoiceNO: finalRadiology.invoiceNo.toString(), - ), - isShowAppBar: true, - baseViewModel: model, - body: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.max, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - margin: EdgeInsets.all(8), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.circular(12), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox(height: 5,), - Texts(TranslationBase.of(context).generalResult), - SizedBox(height: 5,), - Padding( - padding: const EdgeInsets.all(8.0), - child: Texts( - '${finalRadiology.reportData.trim()}', - textAlign: TextAlign.start, - fontSize: 17, - color: Colors.grey, - ), + appBar: PatientProfileHeaderWhitAppointmentAppBar( + patient: patient, + patientType: patientType ?? "0", + arrivalType: arrivalType ?? "0", + appointmentDate: finalRadiology.orderDate, + doctorName: finalRadiology.doctorName, + profileUrl: finalRadiology.doctorImageURL, + invoiceNO: finalRadiology.invoiceNo.toString(), + ), + isShowAppBar: true, + baseViewModel: model, + body: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + margin: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 5, + ), + Texts(TranslationBase.of(context).generalResult), + SizedBox( + height: 5, + ), + Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + '${finalRadiology.reportData.trim()}', + textAlign: TextAlign.start, + fontSize: 17, + color: Colors.grey, ), - SizedBox(height: 25,), - if(model.radImageURL.isNotEmpty) - Center( - child: Container( - width: MediaQuery.of(context).size.width * 0.8, - child: Button( + ), + SizedBox( + height: 100, + ), - color: Colors.red, - onTap: () { - launch(model.radImageURL); - }, - title: TranslationBase.of(context).openRad, - ), - ), - ), - ], - ), + ], ), - ], - ), + ), + ], ), + ), + bottomSheet: model.radImageURL.isNotEmpty ?Container( + width: double.maxFinite, + height: 100, + child: Container( + margin: EdgeInsets.only(left: 35,right: 35,top: 12,bottom: 12), + child: Button( + color: Colors.red, + onTap: () { + launch(model.radImageURL); + }, + title: TranslationBase.of(context).openRad, + ), ), + ):null, + ), ); } } diff --git a/lib/screens/patients/profile/radiology/radiology_home_page.dart b/lib/screens/patients/profile/radiology/radiology_home_page.dart index 27c58e99..5cb14b8a 100644 --- a/lib/screens/patients/profile/radiology/radiology_home_page.dart +++ b/lib/screens/patients/profile/radiology/radiology_home_page.dart @@ -124,7 +124,6 @@ class RadiologyHomePage extends StatelessWidget { invoiceNO: '${model.radiologyList[index].invoiceNo}', branch: '${model.radiologyList[index].projectName}', appointmentDate: model.radiologyList[index].orderDate, - orderNo: model.radiologyList[index].orderNo.toString(), ), )), diff --git a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart index e87a7a39..105c57e9 100644 --- a/lib/screens/patients/profile/vital_sign/LineChartCurved.dart +++ b/lib/screens/patients/profile/vital_sign/LineChartCurved.dart @@ -115,16 +115,30 @@ class LineChartCurved extends StatelessWidget { //rotateAngle:-65, margin: 22, getTitles: (value) { - if (timeSeries.length > value.toInt()) { - DateTime dateTime = timeSeries[value.toInt()].time; - if (isDatesSameYear) { - return monthFormat.format(dateTime); + if (timeSeries.length < 15) { + if (timeSeries.length > value.toInt()) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } } else { - return yearFormat.format(dateTime); + return ''; } } else { - return ''; + if (value.toInt() == 0 || + value.toInt() == timeSeries.length - 1 || + xAxixs.contains(value.toInt())) { + DateTime dateTime = timeSeries[value.toInt()].time; + if (isDatesSameYear) { + return monthFormat.format(dateTime); + } else { + return yearFormat.format(dateTime); + } + } } + /*if (timeSeries.length < 15) { if (timeSeries.length > value.toInt()) { DateTime dateTime = timeSeries[value.toInt()].time; @@ -232,7 +246,7 @@ class LineChartCurved extends StatelessWidget { final LineChartBarData lineChartBarData1 = LineChartBarData( spots: spots, isCurved: true, - colors: [Colors.red]/*[Theme.of(context).primaryColor]*/, + colors: [Colors.red] /*[Theme.of(context).primaryColor]*/, barWidth: 5, isStrokeCapRound: true, dotData: FlDotData( diff --git a/lib/screens/prescription/prescription_items_page.dart b/lib/screens/prescription/prescription_items_page.dart index fa665aff..4197b5b6 100644 --- a/lib/screens/prescription/prescription_items_page.dart +++ b/lib/screens/prescription/prescription_items_page.dart @@ -100,13 +100,25 @@ class PrescriptionItemsPage extends StatelessWidget { Row( children: [ Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(model.prescriptionReportList[index].routeN)), + Expanded(child: Texts(" "+model.prescriptionReportList[index].routeN)), ], ), Row( children: [ Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(model.prescriptionReportList[index].frequencyN ?? ''), + Texts(" "+model.prescriptionReportList[index].frequencyN ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].doseDailyQuantity ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).duration,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), @@ -178,13 +190,25 @@ class PrescriptionItemsPage extends StatelessWidget { Row( children: [ Texts(TranslationBase.of(context).route,color: Colors.grey,), - Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')), + Expanded(child: Texts(" "+model.prescriptionReportEnhList[index].route??'')), ], ), Row( children: [ Texts(TranslationBase.of(context).frequency,color: Colors.grey,), - Texts(model.prescriptionReportEnhList[index].frequency ?? ''), + Texts(" "+model.prescriptionReportEnhList[index].frequency ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).dailyDoses,color: Colors.grey,), + Texts(" "+model.prescriptionReportEnhList[index].doseDailyQuantity.toString() ?? ''), + ], + ), + Row( + children: [ + Texts(TranslationBase.of(context).duration,color: Colors.grey,), + Texts(" "+model.prescriptionReportList[index].days.toString() ?? ''), ], ), SizedBox(height: 12,), diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index fca0e0b4..d705010d 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -21,31 +21,32 @@ class MyScheduleWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ - Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 10, - ), - AppText( - workingHoursTable.dayName, - fontSize: 2.5 * SizeConfig.textMultiplier, - fontFamily: 'Poppins', - // fontSize: 18 - ), - SizedBox( - height: 10, - ), - AppText( - ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', - fontSize: 2.5 * SizeConfig.textMultiplier, - fontWeight: FontWeight.w700, - - fontFamily: 'Poppins', - // fontSize: 18 - ), - ], + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10, + ), + AppText( + workingHoursTable.dayName, + fontSize: 18, + fontFamily: 'Poppins', + // fontSize: 18 + ), + SizedBox( + height: 10, + ), + AppText( + ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', + fontSize: 18, + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', + // fontSize: 18 + ), + ], + ), ), Container( width: MediaQuery.of(context).size.width * 0.55, @@ -80,15 +81,10 @@ class MyScheduleWidget extends StatelessWidget { ), Container( width: MediaQuery.of(context).size.width*0.55, - child: Expanded( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: AppText( - work.from + ' - ' + work.to, - fontSize: 15, - fontWeight: FontWeight.w300, - ), - ), + child: AppText( + '${work.from} - ${work.to}', + fontSize: 15, + fontWeight: FontWeight.w300, ), ) ], diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart index 6e0192a8..5a284435 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart @@ -20,59 +20,65 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred @override Widget build(BuildContext context) { - return PreferredSize( - preferredSize: Size(double.infinity, 200), + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + return Container( + padding: EdgeInsets.only( + left: 0, right: 5, bottom: 5,), + decoration: BoxDecoration( + color: Colors.white, + ), + height: 200, child: Container( padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5,), - decoration: BoxDecoration( - color: Colors.white, - ), - height: 200, - child: Container( - padding: EdgeInsets.only( - left: 10, right: 10, bottom: 10), - margin: EdgeInsets.only(top: 50), - child: Column( - children: [ - Container( - padding: EdgeInsets.only(left: 12.0), - child: Row(children: [ - IconButton( - icon: Icon(Icons.arrow_back_ios), - color: Colors.black, //Colors.black, - onPressed: () => Navigator.pop(context), - ), - AppText( + left: 10, right: 10, bottom: 10), + margin: EdgeInsets.only(top: 50), + child: Column( + children: [ + Container( + padding: EdgeInsets.only(left: 12.0), + child: Row(children: [ + IconButton( + icon: Icon(Icons.arrow_back_ios), + color: Colors.black, //Colors.black, + onPressed: () => Navigator.pop(context), + ), + Expanded( + child: AppText( patient.firstName != null ? (Helpers.capitalize(patient.firstName) + " " + Helpers.capitalize( patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 2.5, + fontSize: SizeConfig.textMultiplier *2.2, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', ), - patient.gender == 1 - ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) - : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), - ]), - ), - Row(children: [ - Padding( - padding: EdgeInsets.only(left: 12.0), - child: Container( - width: 60, - height: 60, - child: Image.asset( - patient.gender == 1 + ), + gender == 1 + ? Icon( + DoctorApp.male_2, + color: Colors.blue, + ) + : Icon( + DoctorApp.female_1, + color: Colors.pink, + ), + ]), + ), + Row(children: [ + Padding( + padding: EdgeInsets.only(left: 12.0), + child: Container( + width: 60, + height: 60, + child: Image.asset( + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -134,182 +140,179 @@ class PatientProfileHeaderNewDesignAppBar extends StatelessWidget with Preferred FontWeight.w600, ) : AppText( - DateUtils.convertStringToDateFormat( - patient - .arrivedOn, - 'MM-dd-yyyy HH:mm'), - fontFamily: - 'Poppins', - fontWeight: - FontWeight.w600, - ) - ], - )) - : SizedBox(), - if (SERVICES_PATIANT2[ - int.parse(patientType)] == - "List_MyOutPatient") - Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context) - .appointmentDate + - " : ", - fontSize: 14, - ), - patient.startTime != null - ? Container( - height: 15, - width: 60, - decoration: - BoxDecoration( - borderRadius: - BorderRadius - .circular( - 25), - color: HexColor( - "#20A169"), - ), - child: AppText( - patient.startTime, - color: Colors.white, - fontSize: 1.5 * - SizeConfig - .textMultiplier, - textAlign: TextAlign - .center, - fontWeight: - FontWeight.bold, - ), - ) - : SizedBox(), - SizedBox( - width: 3.5, + patient.arrivedOn!=null? DateUtils.convertStringToDateFormat( + patient.arrivedOn, + 'MM-dd-yyyy HH:mm'):'', + fontFamily: + 'Poppins', + fontWeight: + FontWeight.w600, + ) + ], + )) + : SizedBox(), + if (SERVICES_PATIANT2[ + int.parse(patientType)] == + "List_MyOutPatient") + Container( + child: Row( + mainAxisAlignment: + MainAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context) + .appointmentDate + + " : ", + fontSize: 14, + ), + patient.startTime != null + ? Container( + height: 15, + width: 60, + decoration: + BoxDecoration( + borderRadius: + BorderRadius + .circular( + 25), + color: HexColor( + "#20A169"), ), - Container( - child: AppText( - convertDateFormat2(patient.appointmentDate.toString()?? ''), - fontSize: 1.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold, - ), + child: AppText( + patient.startTime, + color: Colors.white, + fontSize: 1.5 * + SizeConfig + .textMultiplier, + textAlign: TextAlign + .center, + fontWeight: + FontWeight.bold, ), - SizedBox( - height: 0.5, - ) - ], - ), - margin: EdgeInsets.only( - top: 8, - ), - ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - RichText( - text: TextSpan( - style: TextStyle( - fontSize: 1.6 * - SizeConfig - .textMultiplier, - color: Colors.black), - children: [ - new TextSpan( - text: - TranslationBase.of( - context) - .fileNumber, - style: TextStyle( - fontSize: 12, - fontFamily: - 'Poppins')), - new TextSpan( - text: patient.patientId - .toString(), - style: TextStyle( - fontWeight: - FontWeight.w700, - fontFamily: - 'Poppins', - fontSize: 14)), - ], + ) + : SizedBox(), + SizedBox( + width: 3.5, ), - ), - Row( - children: [ - AppText( - patient.nationalityName ?? - patient.nationality, - fontWeight: FontWeight.bold, - fontSize: 12, + Container( + child: AppText( + convertDateFormat2(patient.appointmentDate.toString()?? ''), + fontSize: 1.5 * + SizeConfig + .textMultiplier, + fontWeight: + FontWeight.bold, ), - patient.nationality != null - ? ClipRRect( - borderRadius: - BorderRadius - .circular( - 20.0), - child: Image.network( - patient - .nationalityFlagURL, - height: 25, - width: 30, - errorBuilder: - (BuildContext - context, - Object - exception, - StackTrace - stackTrace) { - return Text( - 'No Image'); - }, - )) - : SizedBox() - ], - ) - ], - ), - Container( - child: RichText( - text: new TextSpan( - style: new TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, - color: Colors.black, - fontFamily: 'Poppins', ), + SizedBox( + height: 0.5, + ) + ], + ), + margin: EdgeInsets.only( + top: 8, + ), + ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + RichText( + text: TextSpan( + style: TextStyle( + fontSize: 1.6 * + SizeConfig + .textMultiplier, + color: Colors.black), children: [ new TextSpan( - text: TranslationBase.of( + text: + TranslationBase.of( context) - .age + - " : ", + .fileNumber, style: TextStyle( - fontSize: 14)), + fontSize: 12, + fontFamily: + 'Poppins')), new TextSpan( - text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + text: patient.patientId + .toString(), style: TextStyle( fontWeight: FontWeight.w700, + fontFamily: + 'Poppins', fontSize: 14)), ], ), ), + Row( + children: [ + AppText( + patient.nationalityName ?? + patient.nationality, + fontWeight: FontWeight.bold, + fontSize: 12, + ), + patient.nationality != null + ? ClipRRect( + borderRadius: + BorderRadius + .circular( + 20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: + (BuildContext + context, + Object + exception, + StackTrace + stackTrace) { + return Text( + 'No Image'); + }, + )) + : SizedBox() + ], + ) + ], + ), + Container( + child: RichText( + text: new TextSpan( + style: new TextStyle( + fontSize: 1.6 * + SizeConfig.textMultiplier, + color: Colors.black, + fontFamily: 'Poppins', + ), + children: [ + new TextSpan( + text: TranslationBase.of( + context) + .age + + " : ", + style: TextStyle( + fontSize: 14)), + new TextSpan( + text: + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", + style: TextStyle( + fontWeight: + FontWeight.w700, + fontSize: 14)), + ], + ), ), - ], - ), + ), + ], ), - ]), - ], - ), + ), + ]), + ], ), ), ); diff --git a/lib/widgets/patients/profile/patient-profile-header-new-design.dart b/lib/widgets/patients/profile/patient-profile-header-new-design.dart index de0302a2..4f96ac67 100644 --- a/lib/widgets/patients/profile/patient-profile-header-new-design.dart +++ b/lib/widgets/patients/profile/patient-profile-header-new-design.dart @@ -11,25 +11,34 @@ import 'package:hexcolor/hexcolor.dart'; import 'package:intl/intl.dart'; class PatientProfileHeaderNewDesign extends StatelessWidget { - final PatiantInformtion patient; final String patientType; final String arrivalType; - PatientProfileHeaderNewDesign(this.patient, this.patientType, this.arrivalType); + PatientProfileHeaderNewDesign( + this.patient, this.patientType, this.arrivalType); @override Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + return Container( padding: EdgeInsets.only( - left: 0, right: 5, bottom: 5,), + left: 0, + right: 5, + bottom: 5, + ), decoration: BoxDecoration( color: Colors.white, ), height: 200, child: Container( - padding: EdgeInsets.only( - left: 10, right: 10, bottom: 10), + padding: EdgeInsets.only(left: 10, right: 10, bottom: 10), margin: EdgeInsets.only(top: 50), child: Column( children: [ @@ -43,26 +52,26 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { ), Expanded( child: AppText( - patient.firstName != null ? - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier *2.5, + patient.firstName != null + ? (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize(patient.lastName)) + : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier * 2.2, fontWeight: FontWeight.bold, backGroundcolor: Colors.white, fontFamily: 'Poppins', ), ), - patient.gender == 1 + gender == 1 ? Icon( - DoctorApp.male_2, - color: Colors.blue, - ) + DoctorApp.male_2, + color: Colors.blue, + ) : Icon( - DoctorApp.female_1, - color: Colors.pink, - ), + DoctorApp.female_1, + color: Colors.pink, + ), ]), ), Row(children: [ @@ -72,7 +81,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { width: 60, height: 60, child: Image.asset( - patient.gender == 1 + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -84,119 +93,84 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { ), Expanded( child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - SERVICES_PATIANT2[ - int.parse(patientType)] == - "patientArrivalList" + SERVICES_PATIANT2[int.parse(patientType)] == + "patientArrivalList" ? Container( - child: Row( - mainAxisAlignment: - MainAxisAlignment - .spaceBetween, - children: [ - patient.patientStatusType == - 43 - ? AppText( - TranslationBase.of( - context) - .arrivedP, - color: Colors.green, - fontWeight: - FontWeight.bold, - fontFamily: - 'Poppins', - fontSize: 12, - ) - : AppText( - TranslationBase.of( - context) - .notArrived, - color: - Colors.red[800], - fontWeight: - FontWeight.bold, - fontFamily: - 'Poppins', - fontSize: 12, - ), - arrivalType == '1' - ? AppText( - patient.startTime != - null - ? patient - .startTime - : '', - fontFamily: - 'Poppins', - fontWeight: - FontWeight.w600, - ) - : AppText( - DateUtils.convertStringToDateFormat( - patient - .arrivedOn, - 'MM-dd-yyyy HH:mm'), - fontFamily: - 'Poppins', - fontWeight: - FontWeight.w600, - ) - ], - )) + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + patient.patientStatusType == 43 + ? AppText( + TranslationBase.of(context).arrivedP, + color: Colors.green, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ) + : AppText( + TranslationBase.of(context).notArrived, + color: Colors.red[800], + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 12, + ), + arrivalType == '1' + ? AppText( + patient.startTime != null + ? patient.startTime + : '', + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + : AppText( + DateUtils.convertStringToDateFormat( + patient.arrivedOn, + 'MM-dd-yyyy HH:mm'), + fontFamily: 'Poppins', + fontWeight: FontWeight.w600, + ) + ], + )) : SizedBox(), - if (SERVICES_PATIANT2[ - int.parse(patientType)] == + if (SERVICES_PATIANT2[int.parse(patientType)] == "List_MyOutPatient") Container( child: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ AppText( - TranslationBase.of(context) - .appointmentDate + + TranslationBase.of(context).appointmentDate + " : ", fontSize: 14, ), patient.startTime != null ? Container( - height: 15, - width: 60, - decoration: - BoxDecoration( - borderRadius: - BorderRadius - .circular( - 25), - color: HexColor( - "#20A169"), - ), - child: AppText( - patient.startTime, - color: Colors.white, - fontSize: 1.5 * - SizeConfig - .textMultiplier, - textAlign: TextAlign - .center, - fontWeight: - FontWeight.bold, - ), - ) + height: 15, + width: 60, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(25), + color: HexColor("#20A169"), + ), + child: AppText( + patient.startTime, + color: Colors.white, + fontSize: 1.5 * SizeConfig.textMultiplier, + textAlign: TextAlign.center, + fontWeight: FontWeight.bold, + ), + ) : SizedBox(), SizedBox( width: 3.5, ), Container( child: AppText( - convertDateFormat2(patient.appointmentDate.toString()?? ''), - fontSize: 1.5 * - SizeConfig - .textMultiplier, - fontWeight: - FontWeight.bold, + convertDateFormat2( + patient.appointmentDate.toString() ?? ''), + fontSize: 1.5 * SizeConfig.textMultiplier, + fontWeight: FontWeight.bold, ), ), SizedBox( @@ -209,34 +183,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { ), ), Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ RichText( text: TextSpan( style: TextStyle( - fontSize: 1.6 * - SizeConfig - .textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black), children: [ new TextSpan( - text: - TranslationBase.of( - context) - .fileNumber, + text: TranslationBase.of(context).fileNumber, style: TextStyle( - fontSize: 12, - fontFamily: - 'Poppins')), + fontSize: 12, fontFamily: 'Poppins')), new TextSpan( - text: patient.patientId - .toString(), + text: patient.patientId.toString(), style: TextStyle( - fontWeight: - FontWeight.w700, - fontFamily: - 'Poppins', + fontWeight: FontWeight.w700, + fontFamily: 'Poppins', fontSize: 14)), ], ), @@ -244,33 +207,23 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { Row( children: [ AppText( - patient.nationalityName ?? - patient.nationality, + patient.nationalityName ?? patient.nationality, fontWeight: FontWeight.bold, fontSize: 12, ), patient.nationality != null ? ClipRRect( - borderRadius: - BorderRadius - .circular( - 20.0), - child: Image.network( - patient - .nationalityFlagURL, - height: 25, - width: 30, - errorBuilder: - (BuildContext - context, - Object - exception, - StackTrace - stackTrace) { - return Text( - 'No Image'); - }, - )) + borderRadius: BorderRadius.circular(20.0), + child: Image.network( + patient.nationalityFlagURL, + height: 25, + width: 30, + errorBuilder: (BuildContext context, + Object exception, + StackTrace stackTrace) { + return Text('No Image'); + }, + )) : SizedBox() ], ) @@ -280,26 +233,19 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { child: RichText( text: new TextSpan( style: new TextStyle( - fontSize: 1.6 * - SizeConfig.textMultiplier, + fontSize: 1.6 * SizeConfig.textMultiplier, color: Colors.black, fontFamily: 'Poppins', ), children: [ new TextSpan( - text: TranslationBase.of( - context) - .age + - " : ", - style: TextStyle( - fontSize: 14)), + text: TranslationBase.of(context).age + " : ", + style: TextStyle(fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", style: TextStyle( - fontWeight: - FontWeight.w700, - fontSize: 14)), + fontWeight: FontWeight.w700, fontSize: 14)), ], ), ), @@ -326,10 +272,10 @@ class PatientProfileHeaderNewDesign extends StatelessWidget { var date = new DateTime.fromMillisecondsSinceEpoch( int.parse(str.substring(startIndex + start.length, endIndex))); newDate = date.year.toString() + - "/" + - date.month.toString().padLeft(2, '0') + - "/" + - date.day.toString().padLeft(2, '0'); + "/" + + date.month.toString().padLeft(2, '0') + + "/" + + date.day.toString().padLeft(2, '0'); } return newDate.toString(); diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart index 57f79f7a..61cb7b52 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card.dart @@ -41,6 +41,13 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { @override Widget build(BuildContext context) { + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + ProjectViewModel projectViewModel = Provider.of(context); return Container( padding: EdgeInsets.only( @@ -63,17 +70,20 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)), - fontSize: SizeConfig.textMultiplier * 3, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + patient.firstName != null ? + (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize( + patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier *2.2, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), ), - patient.gender == 1 + gender == 1 ? Icon( DoctorApp.male_2, color: Colors.blue, @@ -91,7 +101,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { width: 60, height: 60, child: Image.asset( - patient.gender == 1 + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -210,7 +220,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { ), Container( child: AppText( - convertDateFormat2(patient.appointmentDate??''), + convertDateFormat2(patient.appointmentDate.toString()?? ''), fontSize: 1.5 * SizeConfig .textMultiplier, @@ -275,8 +285,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { .circular( 20.0), child: Image.network( - patient - .nationalityFlagURL, + patient.nationalityFlagURL, height: 25, width: 30, errorBuilder: @@ -314,7 +323,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget { fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", style: TextStyle( fontWeight: FontWeight.w700, diff --git a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart index 274d2264..d63754df 100644 --- a/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart +++ b/lib/widgets/patients/profile/patient_profile_header_with_appointment_card_app_bar.dart @@ -42,6 +42,13 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); + int gender = 1; + if (patient.patientDetails != null) { + gender = patient.patientDetails.gender; + } else { + gender = patient.gender; + } + return Container( padding: EdgeInsets.only( left: 0, right: 5, bottom: 5, top: 5), @@ -63,18 +70,20 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre color: Colors.black, //Colors.black, onPressed: () => Navigator.pop(context), ), - AppText( - patient.firstName != null ? - (Helpers.capitalize(patient.firstName) + - " " + - Helpers.capitalize( - patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), - fontSize: SizeConfig.textMultiplier * 2.5, - fontWeight: FontWeight.bold, - backGroundcolor: Colors.white, - fontFamily: 'Poppins', + Expanded( + child: AppText( + patient.firstName != null ? + (Helpers.capitalize(patient.firstName) + + " " + + Helpers.capitalize( + patient.lastName)) : Helpers.capitalize(patient.patientDetails.fullName), + fontSize: SizeConfig.textMultiplier *2.2, + fontWeight: FontWeight.bold, + backGroundcolor: Colors.white, + fontFamily: 'Poppins', + ), ), - patient.gender == 1 + gender == 1 ? Icon( DoctorApp.male_2, color: Colors.blue, @@ -92,7 +101,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre width: 60, height: 60, child: Image.asset( - patient.gender == 1 + gender == 1 ? 'assets/images/male_avatar.png' : 'assets/images/female_avatar.png', fit: BoxFit.cover, @@ -211,7 +220,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre ), Container( child: AppText( - convertDateFormat2(patient.appointmentDate??''), + convertDateFormat2(patient.appointmentDate.toString()?? ''), fontSize: 1.5 * SizeConfig .textMultiplier, @@ -276,8 +285,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre .circular( 20.0), child: Image.network( - patient - .nationalityFlagURL, + patient.nationalityFlagURL, height: 25, width: 30, errorBuilder: @@ -315,7 +323,7 @@ class PatientProfileHeaderWhitAppointmentAppBar extends StatelessWidget with Pre fontSize: 14)), new TextSpan( text: - "${DateUtils.getAgeByBirthday(patient.dateofBirth, context)}", + "${DateUtils.getAgeByBirthday(patient.patientDetails != null ? patient.patientDetails.dateofBirth : patient.dateofBirth, context)}", style: TextStyle( fontWeight: FontWeight.w700, diff --git a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart index 24a69a0b..57eb065b 100644 --- a/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart +++ b/lib/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart @@ -38,7 +38,7 @@ class ExpandableSOAPWidget extends StatelessWidget { Texts(headerTitle, variant: isExpanded ? "bodyText" : '', bold: isExpanded ? true : false, - fontSize: 20, + fontSize: 15, color: Colors.black), Icon( FontAwesomeIcons.asterisk, diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index dab907b2..88c47706 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -32,7 +32,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, left: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -40,8 +40,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - width: 50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 0 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -57,7 +57,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -70,7 +70,7 @@ class StepsWidget extends StatelessWidget { AppText( "Subjective", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 12, ), StatusLabel(selectedStepId: index, stepId: 0,), @@ -81,7 +81,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, left: MediaQuery .of(context) .size @@ -92,8 +92,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 50, - height: 50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 1 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -109,7 +109,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -122,7 +122,7 @@ class StepsWidget extends StatelessWidget { AppText( "Objective", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 12, ), StatusLabel(selectedStepId: index, stepId: 1,), @@ -134,7 +134,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, left: MediaQuery .of(context) .size @@ -148,8 +148,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width:50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 2 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -165,7 +165,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -178,7 +178,7 @@ class StepsWidget extends StatelessWidget { AppText( "Assessment", fontWeight: FontWeight.bold, - fontSize: 14, + fontSize: 12, ), StatusLabel(selectedStepId: index, stepId: 2,), ], @@ -188,16 +188,16 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, right: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, child: Column( - crossAxisAlignment: CrossAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.end, children: [ Container( - width:50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 3 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -213,7 +213,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -222,12 +222,13 @@ class StepsWidget extends StatelessWidget { ), Center( child: Column( + crossAxisAlignment: CrossAxisAlignment.end, children: [ AppText( "Plan", fontWeight: FontWeight.bold, textAlign: TextAlign.center, - fontSize: 14, + fontSize: 12, ), StatusLabel(selectedStepId: index, stepId: 3,), ], @@ -257,7 +258,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, right: 0, child: InkWell( onTap: () => changeCurrentTab(0), @@ -265,8 +266,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - width: 50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 0 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -282,7 +283,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -299,7 +300,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, right: MediaQuery .of(context) .size @@ -310,8 +311,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width: 50, - height: 50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 1 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -327,7 +328,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -355,8 +356,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width:50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 2 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -372,7 +373,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -393,7 +394,7 @@ class StepsWidget extends StatelessWidget { ), ), Positioned( - top: 45, + top: 50, left: 0, child: InkWell( onTap: () => index >= 3 ? changeCurrentTab(4) : null, @@ -401,8 +402,8 @@ class StepsWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - width:50, - height:50, + width: 38, + height: 38, decoration: BoxDecoration( border: index == 3 ? Border.all(color: Color(0xFFCC9B14), width: 2) @@ -418,7 +419,7 @@ class StepsWidget extends StatelessWidget { : Color(0xFFCCCCCC), ), child: Center( - child: Icon(FontAwesomeIcons.check, size: 25, + child: Icon(FontAwesomeIcons.check, size: 20, color: Colors.white,) ), ), @@ -453,7 +454,8 @@ class StatusLabel extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.symmetric(horizontal: 5, vertical: 3), + width: 65, + padding: EdgeInsets.symmetric(horizontal: 2, vertical: 3), decoration: BoxDecoration( color: stepId == selectedStepId ? Color(0xFFF1E9D3) : stepId < selectedStepId ? Color(0xFFD8E8DB) : Color(0xFFCCCCCC), diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart b/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart index 90211413..fd424767 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart @@ -1,10 +1,10 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/new_text_Field.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:hexcolor/hexcolor.dart'; + +import '../custom_validation_error.dart'; class UpdateChiefComplaints extends StatelessWidget { const UpdateChiefComplaints({ @@ -13,137 +13,110 @@ class UpdateChiefComplaints extends StatelessWidget { @required this.complaintsController, @required this.illnessController, @required this.medicationController, + this.complaintsControllerError, + this.illnessControllerError, + this.medicationControllerError, }) : super(key: key); final GlobalKey formKey; final TextEditingController complaintsController; final TextEditingController illnessController; final TextEditingController medicationController; + final String complaintsControllerError; + final String illnessControllerError; + final String medicationControllerError; @override Widget build(BuildContext context) { return Form( key: formKey, - child: Column(children: [ + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 20, ), + //TODO handel error cases + NewTextFields( + hintText: TranslationBase.of(context).addChiefComplaints, + controller: complaintsController, + maxLines: 25, + minLines: 3, + ), Container( + child: CustomValidationError( + error: complaintsControllerError, + )), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all( - Radius.circular(10.0), + // Container( + // margin: + // EdgeInsets.only(left: 10, right: 10, top: 15), + // child: TextFields( + // hasLabelText: complaintsController.text != '' + // ? true + // : false, + // hintText: TranslationBase + // .of(context) + // .addChiefComplaints, + // fontSize: 13.5, + // // hintColor: Colors.black, + // showLabelText: true, + // fontWeight: FontWeight.w600, + // maxLines: 25, + // minLines: 13, + // controller: complaintsController, + // validator: (value) { + // if (value == null || value == "") + // return TranslationBase.of(context) + // .emptyMessage; + // else if (value.length < 25) + // return TranslationBase + // .of(context) + // .chiefComplaintLength; + // //""; + // else + // return null; + // }), + // ), + SizedBox( + height: 20, ), - border: Border.all( - color: HexColor('#707070'), - width: 0.30), - ), - child: NewTextFields( - hintText: TranslationBase.of(context).addChiefComplaints, - controller: complaintsController, - ), - ), - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hasLabelText: complaintsController.text != '' - ? true - : false, - hintText: TranslationBase - .of(context) - .addChiefComplaints, - fontSize: 13.5, - // hintColor: Colors.black, - showLabelText: true, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 13, - controller: complaintsController, - validator: (value) { - if (value == null || value == "") - return TranslationBase.of(context) - .emptyMessage; - else if (value.length < 25) - return TranslationBase - .of(context) - .chiefComplaintLength; - //""; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hasLabelText: - illnessController.text != '' ? true : false, - showLabelText: true, + + NewTextFields( hintText: TranslationBase .of(context) .historyOfPresentIllness, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 13, controller: illnessController, - validator: (value) { - if (value == null || value == "") - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - SizedBox( - height: 10, - ), - UpdateMedicationWidget( - medicationController: medicationController, - ), - SizedBox( - height: 10, - ), - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hasLabelText: medicationController.text != '' - ? true - : false, - showLabelText: true, + maxLines: 25, + minLines: 3, + ), + Container( + child: CustomValidationError(error: illnessControllerError,)), + SizedBox( + height: 20, + ), + SizedBox( + height: 10, + ), + UpdateMedicationWidget( + medicationController: medicationController, + ), + SizedBox( + height: 10, + ), + NewTextFields( hintText: TranslationBase .of(context) .currentMedications, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 23, - minLines: 10, controller: medicationController, - validator: (value) { - if (value == null || value == "") - return TranslationBase - .of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 10, - ), - ]), + maxLines: 25, + minLines: 3, + ), + Container(child: CustomValidationError( + error: medicationControllerError,)), + SizedBox( + height: 10, + ), + ]), ); } } \ No newline at end of file diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart index f32bfe6e..68844765 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart @@ -16,6 +16,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/dialogs/master_key_dailog.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; import '../custom_validation_error.dart'; @@ -40,17 +41,19 @@ class _UpdateMedicationWidgetState extends State { return Column( children: [ Container( - margin: EdgeInsets.only(left: 10, right: 10, top: 15), child: TextFields( hintText: TranslationBase.of(context).addMedication, + borderColor: HexColor('#707070'), + borderWidth: 0.30, fontSize: 13.5, + borderRadius: 12, onTapTextFields: () { openMedicationList(context); }, readOnly: true, // hintColor: Colors.black, suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, + suffixIconColor: Color(0xFF2B353E), fontWeight: FontWeight.w600, // controller: messageController, validator: (value) { diff --git a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart index 140fec54..c3a43648 100644 --- a/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/widgets/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -19,8 +19,6 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_Chief_complaints.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_allergies_widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_history_widget.dart'; -import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/subjective/update_medication_widget.dart'; -import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; @@ -53,7 +51,9 @@ class _UpdateSubjectivePageState extends State { TextEditingController illnessController = TextEditingController(); TextEditingController complaintsController = TextEditingController(); TextEditingController medicationController = TextEditingController(); - + String complaintsControllerError = ''; + String medicationControllerError = ''; + String illnessControllerError = ''; final formKey = GlobalKey(); getHistory(SOAPViewModel model) async { @@ -235,16 +235,23 @@ class _UpdateSubjectivePageState extends State { height: 30, ), ExpandableSOAPWidget( - headerTitle: TranslationBase - .of(context) + headerTitle: TranslationBase.of(context) .chiefComplaints - .toUpperCase(), + , onTap: () { setState(() { isChiefExpand = !isChiefExpand; }); }, - child: UpdateChiefComplaints(formKey: formKey, complaintsController: complaintsController, illnessController: illnessController, medicationController: medicationController), + child: UpdateChiefComplaints( + formKey: formKey, + complaintsController: complaintsController, + illnessController: illnessController, + medicationController: medicationController, + complaintsControllerError: complaintsControllerError, + illnessControllerError: illnessControllerError, + medicationControllerError: medicationControllerError, + ), isExpanded: isChiefExpand, ), SizedBox( @@ -255,8 +262,7 @@ class _UpdateSubjectivePageState extends State { ExpandableSOAPWidget( headerTitle: TranslationBase .of(context) - .histories - .toUpperCase(), + .histories, onTap: () { setState(() { isHistoryExpand = !isHistoryExpand; @@ -278,7 +284,7 @@ class _UpdateSubjectivePageState extends State { headerTitle: TranslationBase .of(context) .allergiesSoap - .toUpperCase(), + , onTap: () { setState(() { isAllergiesExpand = !isAllergiesExpand; @@ -356,7 +362,9 @@ class _UpdateSubjectivePageState extends State { formKey.currentState.save(); formKey.currentState.validate(); - + complaintsControllerError = ''; + medicationControllerError = ''; + illnessControllerError = ''; if (complaintsController.text.isNotEmpty && illnessController.text.isNotEmpty && complaintsController.text.length > 25) { @@ -382,6 +390,29 @@ class _UpdateSubjectivePageState extends State { widget.changePageViewIndex(1); } else { + setState(() { + if (complaintsController.text.isEmpty) { + complaintsControllerError = TranslationBase + .of(context) + .emptyMessage; + } else if (complaintsController.text.length < 25) { + complaintsControllerError = TranslationBase + .of(context) + .chiefComplaintLength; + } + + if (illnessController.text.isEmpty) { + illnessControllerError = TranslationBase + .of(context) + .emptyMessage; + } + + if (medicationController.text.isEmpty) { + medicationControllerError = TranslationBase + .of(context) + .emptyMessage; + } + }); helpers.showErrorToast(TranslationBase .of(context) .chiefComplaintErrorMsg); diff --git a/lib/widgets/patients/profile/soap_update/update_objective_page.dart b/lib/widgets/patients/profile/soap_update/update_objective_page.dart index af960ff7..1ce5fbea 100644 --- a/lib/widgets/patients/profile/soap_update/update_objective_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_objective_page.dart @@ -1,5 +1,6 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/master_lookup_key.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; @@ -13,6 +14,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:doctor_app_flutter/widgets/patients/profile/soap_update/expandable_SOAP_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; @@ -25,6 +27,7 @@ import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:hexcolor/hexcolor.dart'; import 'package:provider/provider.dart'; class UpdateObjectivePage extends StatefulWidget { @@ -33,8 +36,13 @@ class UpdateObjectivePage extends StatefulWidget { final List mySelectedExamination; final PatiantInformtion patientInfo; + UpdateObjectivePage( - {Key key, this.changePageViewIndex, this.mySelectedExamination, this.patientInfo, this.changeLoadingState}); + {Key key, + this.changePageViewIndex, + this.mySelectedExamination, + this.patientInfo, + this.changeLoadingState}); @override _UpdateObjectivePageState createState() => _UpdateObjectivePageState(); @@ -55,6 +63,7 @@ class _UpdateObjectivePageState extends State { )), ); } + @override Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; @@ -97,350 +106,435 @@ class _UpdateObjectivePageState extends State { builder: (_, model, w) => AppScaffold( isShowAppBar: false, // baseViewModel: model, - - body: SingleChildScrollView( - physics: ScrollPhysics(), - child: Center( - child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 30, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Texts(TranslationBase.of(context).physicalSystemExamination, - variant: isSysExaminationExpand - ? "bodyText" - : '', - bold: isSysExaminationExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: AppGlobal.appPrimaryColor, - size: 12, - ) - ], + body: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: SingleChildScrollView( + physics: ScrollPhysics(), + child: Container( + color: Color.fromRGBO(248, 248, 248, 1), + child: Center( + child: FractionallySizedBox( + widthFactor: 0.95, + child: Container( + margin: EdgeInsets.all(8.0), + padding: EdgeInsets.all(12.0), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + color: Colors.white, + borderRadius: BorderRadius.circular(12), + border: Border.fromBorderSide(BorderSide( + color: Colors.grey.shade400, + width: 0.4, + )), ), - InkWell( - onTap: () { - setState(() { - isSysExaminationExpand = - !isSysExaminationExpand; - }); - }, - child: Icon(isSysExaminationExpand - ? EvaIcons.minus - : EvaIcons.plus)) - ], - ), - bodyWidget: Column(children: [ - SizedBox( - height: 20, - ), - Column( - children: [ - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - child: TextFields( - hintText: TranslationBase.of(context).physicalSystemExamination, - fontSize: 13.5, - onTapTextFields: () { - openExaminationList(context); - }, - readOnly: true, - // hintColor: Colors.black, - suffixIcon: EvaIcons.plusCircleOutline, - suffixIconColor: AppGlobal.appPrimaryColor, - fontWeight: FontWeight.w600, - // controller: messageController, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - Column( - children: - widget.mySelectedExamination.map((examination) { - TextEditingController remarksController= TextEditingController(text :examination.remark); - - return Container( - margin: EdgeInsets.only( - left: 15, right: 15, top: 15), - child: Column(children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Texts( - ( examination - .selectedExamination.nameEn ) - .toUpperCase(), - variant: "bodyText", - bold: true, - color: Colors.black) - ], - ), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + HeaderBodyExpandableNotifier( + headerWidget: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Row( + children: [ + AppText( + "${TranslationBase.of(context).physicalSystemExamination}", + fontFamily: 'Poppins', + fontSize: SizeConfig.textMultiplier * 2.0, + fontWeight: isSysExaminationExpand ? FontWeight.w700 : FontWeight.normal, + ), + /*Texts( + TranslationBase.of(context) + .physicalSystemExamination, + variant: isSysExaminationExpand + ? "bodyText" + : '', + bold: isSysExaminationExpand + ? true + : false, + color: Colors.black),*/ + Icon( + FontAwesomeIcons.asterisk, + color: AppGlobal.appPrimaryColor, + size: 12, + ) + ], + ), + InkWell( + onTap: () { + setState(() { + isSysExaminationExpand = + !isSysExaminationExpand; + }); + }, + child: Icon(isSysExaminationExpand + ? Icons.keyboard_arrow_up + : Icons.keyboard_arrow_down)) + ], + ), + bodyWidget: Column(children: [ SizedBox( - height: 8, + height: 20, ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, + Column( children: [ - Row( - children: [ - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .isNormal - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.grey), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - TranslationBase.of(context).normal, - style: TextStyle( - fontSize: 12, - color: - examination - .isNormal - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), - ), - ), - )), - ), - onTap: () { - setState(() { - examination.isAbnormal = - false; - examination.isNormal = - true; - examination.notExamined = false; - }); - }), - SizedBox( - width: 12, - ), - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .isAbnormal - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.black), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - TranslationBase.of(context).abnormal, - style: TextStyle( - fontSize: 12, - color: - examination - .isAbnormal - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), + Container( + margin: EdgeInsets.only( + left: 10, right: 10, top: 15), + child: TextFields( + hintText: TranslationBase.of(context) + .physicalSystemExamination, + fontSize: 13.5, + onTapTextFields: () { + openExaminationList(context); + }, + readOnly: true, + // hintColor: Colors.black, + suffixIcon: + EvaIcons.plusCircleOutline, + suffixIconColor: + AppGlobal.appPrimaryColor, + fontWeight: FontWeight.w600, + // controller: messageController, + validator: (value) { + if (value == null) + return TranslationBase.of(context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 20, + ), + Column( + children: widget.mySelectedExamination + .map((examination) { + TextEditingController + remarksController = + TextEditingController( + text: examination.remark); + + return Container( + margin: EdgeInsets.only( + left: 15, right: 15, top: 15), + child: Column(children: [ + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Texts( + (examination + .selectedExamination + .nameEn) + .toUpperCase(), + variant: "bodyText", + bold: true, + color: Colors.black) + ], + ), + SizedBox( + height: 8, + ), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceBetween, + children: [ + Row( + children: [ + InkWell( + child: Center( + child: Container( + height: screenSize + .height * + 0.070, + decoration: containerBorderDecoration( + examination + .isNormal + ? Color( + 0xFF515A5D) + : Colors + .white, + Colors + .grey), + child: Center( + child: + Padding( + padding: + const EdgeInsets.all( + 8.0), + child: Text( + TranslationBase.of( + context) + .normal, + style: + TextStyle( + fontSize: + 12, + color: examination.isNormal + ? Colors.white + : Colors.black, + //Colors.black, + fontWeight: + FontWeight.bold, + ), + ), + ), + )), + ), + onTap: () { + setState(() { + examination + .isAbnormal = + false; + examination + .isNormal = + true; + examination + .notExamined = + false; + }); + }), + SizedBox( + width: 12, ), - ), - )), - ), - onTap: () { - setState(() { - examination.isNormal = - false; - examination.isAbnormal = - true; - examination.notExamined = false; - }); - }),SizedBox( - width: 12, - ), - InkWell( - child: Center( - child: Container( - height: - screenSize.height * - 0.070, - decoration: - containerBorderDecoration( - examination - .notExamined - ? Color( - 0xFF515A5D) - : Colors - .white, - Colors.black), - child: Center( - child: Padding( - padding: - const EdgeInsets - .all(8.0), - child: Text( - "Not Examined", - style: TextStyle( - fontSize: 12, - color: - examination - .notExamined - ? Colors.white - : Colors - .black, - //Colors.black, - fontWeight: - FontWeight - .bold, - ), + InkWell( + child: Center( + child: Container( + height: screenSize + .height * + 0.070, + decoration: containerBorderDecoration( + examination + .isAbnormal + ? Color( + 0xFF515A5D) + : Colors + .white, + Colors + .black), + child: Center( + child: + Padding( + padding: + const EdgeInsets.all( + 8.0), + child: Text( + TranslationBase.of( + context) + .abnormal, + style: + TextStyle( + fontSize: + 12, + color: examination.isAbnormal + ? Colors.white + : Colors.black, + //Colors.black, + fontWeight: + FontWeight.bold, + ), + ), + ), + )), + ), + onTap: () { + setState(() { + examination + .isNormal = + false; + examination + .isAbnormal = + true; + examination + .notExamined = + false; + }); + }), + SizedBox( + width: 12, ), + InkWell( + child: Center( + child: Container( + height: screenSize + .height * + 0.070, + decoration: containerBorderDecoration( + examination + .notExamined + ? Color( + 0xFF515A5D) + : Colors + .white, + Colors + .black), + child: Center( + child: + Padding( + padding: + const EdgeInsets.all( + 8.0), + child: Text( + "Not Examined", + style: + TextStyle( + fontSize: + 12, + color: examination.notExamined + ? Colors.white + : Colors.black, + //Colors.black, + fontWeight: + FontWeight.bold, + ), + ), + ), + )), + ), + onTap: () { + setState(() { + examination + .isAbnormal = + false; + examination + .isNormal = + false; + examination + .notExamined = + true; + }); + }), + ], + ), + InkWell( + child: Icon( + FontAwesomeIcons.trash, + color: Colors.grey, + size: 20, ), - )), - ), - onTap: () { - setState(() { - examination.isAbnormal = - false; - examination.isNormal = - false; - examination.notExamined = true; - }); - }), - ], - ), - InkWell( - - child: Icon( - FontAwesomeIcons.trash, - color: Colors.grey, - size: 20, - ), - onTap: () => removeExamination( - examination.selectedExamination), + onTap: () => removeExamination( + examination + .selectedExamination), + ) + ], + ), + SizedBox( + height: 20, + ), + Container( + margin: EdgeInsets.only( + left: 0, right: 0, top: 15), + child: TextFields( + hasLabelText: + remarksController + .text != + '' + ? true + : false, + showLabelText: true, + hintText: + TranslationBase.of( + context) + .remarks, + fontSize: 13.5, + // hintColor: Colors.black, + fontWeight: FontWeight.w600, + maxLines: 25, + minLines: 4, + controller: + remarksController, + onChanged: (val) { + examination.remark = val; + }, + validator: (value) { + if (value == null) + return TranslationBase + .of(context) + .emptyMessage; + else + return null; + }), + ), + SizedBox( + height: 20, + ), + ])); + }).toList(), ) ], - ), - SizedBox( - height: 20, - ), - Container( - margin: EdgeInsets.only( - left: 0, right: 0, top: 15), - child: TextFields( - hasLabelText: remarksController.text != ''?true:false, - showLabelText: true, - hintText: TranslationBase.of(context).remarks, - fontSize: 13.5, - // hintColor: Colors.black, - fontWeight: FontWeight.w600, - maxLines: 25, - minLines: 4, - controller: remarksController, - onChanged: (val) { - examination.remark = val; - }, - validator: (value) { - if (value == null) - return TranslationBase.of(context) - .emptyMessage; - else - return null; - }), - ), - SizedBox( - height: 20, - ), - ])); - }).toList(), - ) - ], - ) - ]), - isExpand: isSysExaminationExpand, + ) + ]), + isExpand: isSysExaminationExpand, + ), + ], + ), + ), + ), + ), + ), ), - DividerWithSpacesAround(height: 30,), - AppButton( - title: TranslationBase.of(context).next, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - await submitUpdateObjectivePage(model); - }, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), + child: Row( + children: [ + Expanded( + child: AppButton( + title: TranslationBase.of(context).previous, + color: HexColor("#EAEAEA"), + fontColor: Colors.black, + onPressed: () { + widget.changePageViewIndex(0); + }, + ), + ), + SizedBox( + width: 10, ), - SizedBox( - height: 30, + Expanded( + child: AppButton( + title: TranslationBase.of(context).next, + loading: model.state == ViewState.BusyLocal, + color: HexColor("#A5A5A5"), + fontColor: HexColor("#5A5A5A"), + fontWeight: FontWeight.bold, + onPressed: () async { + await submitUpdateObjectivePage(model); + }, + ), + ), + ], ), - ], - ), - ), - ), - ))); + ), + ], + ))); } submitUpdateObjectivePage(SOAPViewModel model) async { - - if(widget.mySelectedExamination.isNotEmpty){ + if (widget.mySelectedExamination.isNotEmpty) { Map profile = await sharedPref.getObj(DOCTOR_PROFILE); DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - PostPhysicalExamRequestModel postPhysicalExamRequestModel = new PostPhysicalExamRequestModel(); + PostPhysicalExamRequestModel postPhysicalExamRequestModel = + new PostPhysicalExamRequestModel(); widget.mySelectedExamination.forEach((exam) { if (postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM == null) - postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = []; + postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM = + []; - postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM.add( - ListHisProgNotePhysicalExaminationVM( + postPhysicalExamRequestModel.listHisProgNotePhysicalExaminationVM + .add(ListHisProgNotePhysicalExaminationVM( patientMRN: widget.patientInfo.patientMRN, episodeId: widget.patientInfo.episodeNo, appointmentNo: widget.patientInfo.appointmentNo, remarks: exam.remark ?? '', - createdBy: exam.createdBy??doctorProfile.doctorID, + createdBy: exam.createdBy ?? doctorProfile.doctorID, createdOn: DateTime.now().toIso8601String(), editedBy: doctorProfile.doctorID, editedOn: DateTime.now().toIso8601String(), @@ -450,15 +544,20 @@ class _UpdateObjectivePageState extends State { isNormal: exam.isNormal, // masterDescription: exam.selectedExamination, notExamined: exam.notExamined, - examinationType: exam.isNormal?1:exam.isAbnormal?2:3, - examinationTypeName: exam.isNormal?"Normal":exam.isAbnormal?'AbNormal':"Not Examined", - isNew:exam.isNew - - )); + examinationType: exam.isNormal + ? 1 + : exam.isAbnormal + ? 2 + : 3, + examinationTypeName: exam.isNormal + ? "Normal" + : exam.isAbnormal + ? 'AbNormal' + : "Not Examined", + isNew: exam.isNew)); }); - if(model.patientPhysicalExamList.isEmpty) { - + if (model.patientPhysicalExamList.isEmpty) { await model.postPhysicalExam(postPhysicalExamRequestModel); } else { await model.patchPhysicalExam(postPhysicalExamRequestModel); @@ -482,9 +581,8 @@ class _UpdateObjectivePageState extends State { removeExamination(MasterKeyModel masterKey) { Iterable history = widget.mySelectedExamination - .where( - (element) => - masterKey.id == element.selectedExamination.id && + .where((element) => + masterKey.id == element.selectedExamination.id && masterKey.typeId == element.selectedExamination.typeId); if (history.length > 0) @@ -494,11 +592,9 @@ class _UpdateObjectivePageState extends State { } openExaminationList(BuildContext context) { - final screenSize = MediaQuery - .of(context) - .size; - InputDecoration textFieldSelectorDecoration(String hintText, - String selectedText, bool isDropDown) { + final screenSize = MediaQuery.of(context).size; + InputDecoration textFieldSelectorDecoration( + String hintText, String selectedText, bool isDropDown) { return InputDecoration( focusedBorder: OutlineInputBorder( borderSide: BorderSide(color: Color(0xFFCCCCCC), width: 2.0), @@ -533,7 +629,8 @@ class _UpdateObjectivePageState extends State { Navigator.of(context).pop(); }); }, - removeExamination: (masterKey) => removeExamination(masterKey),); + removeExamination: (masterKey) => removeExamination(masterKey), + ); }); } } @@ -541,10 +638,13 @@ class _UpdateObjectivePageState extends State { class AddExaminationDailog extends StatefulWidget { final List mySelectedExamination; final Function addSelectedExamination; - final Function (MasterKeyModel) removeExamination; + final Function(MasterKeyModel) removeExamination; const AddExaminationDailog( - {Key key, this.mySelectedExamination, this.addSelectedExamination, this.removeExamination}) + {Key key, + this.mySelectedExamination, + this.addSelectedExamination, + this.removeExamination}) : super(key: key); @override @@ -559,71 +659,69 @@ class _AddExaminationDailogState extends State { child: BaseView( onModelReady: (model) async { if (model.physicalExaminationList.length == 0) { - await model.getMasterLookup( - MasterKeysService.PhysicalExamination); + await model + .getMasterLookup(MasterKeysService.PhysicalExamination); } }, - builder: (_, model, w) => - AppScaffold( + builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: false, body: Center( child: Container( child: FractionallySizedBox( - widthFactor: 0.9, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 16, - ), - AppText( - TranslationBase.of(context).physicalSystemExamination, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - SizedBox( - height: 16, - ), - MasterKeyCheckboxSearchWidget( - model: model, - hintSearchText: TranslationBase.of(context).searchExamination, - buttonName: TranslationBase.of(context).addExamination, - masterList: model.physicalExaminationList, - removeHistory: (history){ - setState(() { - widget.removeExamination(history); - }); - }, - addHistory: (history){ - setState(() { - MySelectedExamination mySelectedExamination = new MySelectedExamination( - selectedExamination: history - ); - widget - .mySelectedExamination - .add( - mySelectedExamination); - }); - }, - addSelectedHistories: (){ - widget.addSelectedExamination(); - }, - isServiceSelected: (master) =>isServiceSelected(master), - ), - ]), - ))), + widthFactor: 0.9, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 16, + ), + AppText( + TranslationBase.of(context).physicalSystemExamination, + fontWeight: FontWeight.bold, + fontSize: 16, + ), + SizedBox( + height: 16, + ), + MasterKeyCheckboxSearchWidget( + model: model, + hintSearchText: + TranslationBase.of(context).searchExamination, + buttonName: + TranslationBase.of(context).addExamination, + masterList: model.physicalExaminationList, + removeHistory: (history) { + setState(() { + widget.removeExamination(history); + }); + }, + addHistory: (history) { + setState(() { + MySelectedExamination mySelectedExamination = + new MySelectedExamination( + selectedExamination: history); + widget.mySelectedExamination + .add(mySelectedExamination); + }); + }, + addSelectedHistories: () { + widget.addSelectedExamination(); + }, + isServiceSelected: (master) => + isServiceSelected(master), + ), + ]), + ))), )), ); } isServiceSelected(MasterKeyModel masterKey) { - Iterable exam = - widget - .mySelectedExamination - .where((element) => - masterKey.id == element.selectedExamination.id && - masterKey.typeId == element.selectedExamination.typeId); + Iterable exam = widget.mySelectedExamination.where( + (element) => + masterKey.id == element.selectedExamination.id && + masterKey.typeId == element.selectedExamination.typeId); if (exam.length > 0) { return true; } diff --git a/lib/widgets/shared/TextFields.dart b/lib/widgets/shared/TextFields.dart index 706c65b7..18d8e778 100644 --- a/lib/widgets/shared/TextFields.dart +++ b/lib/widgets/shared/TextFields.dart @@ -77,7 +77,7 @@ class TextFields extends StatefulWidget { this.hasBorder = true, this.onTapTextFields, this.hasLabelText = false, - this.showLabelText = false}) + this.showLabelText = false, this.borderRadius= 8.0, this.borderColor, this.borderWidth = 1, }) : super(key: key); final String hintText; @@ -116,6 +116,9 @@ class TextFields extends StatefulWidget { final Color fillColor; final bool hasBorder; final bool showLabelText; + Color borderColor; + final double borderRadius; + final double borderWidth; bool hasLabelText; @override @@ -200,6 +203,8 @@ class _TextFieldsState extends State { @override Widget build(BuildContext context) { + + widget.borderColor = widget.borderColor?? Colors.grey; return (AnimatedContainer( duration: Duration(milliseconds: 300), decoration: widget.bare @@ -276,6 +281,7 @@ class _TextFieldsState extends State { hintText: widget.hintText, hintStyle: TextStyle( fontSize: widget.fontSize, + fontWeight: widget.fontWeight, color: widget.hintColor ?? Theme.of(context).hintColor, ), @@ -304,7 +310,7 @@ class _TextFieldsState extends State { width: 1.0) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), focusedErrorBorder: OutlineInputBorder( @@ -315,28 +321,28 @@ class _TextFieldsState extends State { .withOpacity(widget.bare ? 0.0 : 0.5), width: 1.0) : BorderSide(color: Colors.transparent, width: 0), - borderRadius: BorderRadius.circular(widget.bare ? 0.0 : 8.0)), + borderRadius: BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius)), focusedBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), disabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0)), enabledBorder: OutlineInputBorder( borderSide: widget.hasBorder - ? BorderSide(color: Colors.grey, width: 1.0) + ? BorderSide(color: widget.borderColor,width: widget.borderWidth) : BorderSide(color: Colors.transparent, width: 0), borderRadius: widget.hasBorder - ? BorderRadius.circular(widget.bare ? 0.0 : 8.0) + ? BorderRadius.circular(widget.bare ? 0.0 : widget.borderRadius) : BorderRadius.circular(0.0), ), ), diff --git a/lib/widgets/shared/new_text_Field.dart b/lib/widgets/shared/new_text_Field.dart index dc361abd..f2e90f44 100644 --- a/lib/widgets/shared/new_text_Field.dart +++ b/lib/widgets/shared/new_text_Field.dart @@ -2,6 +2,7 @@ import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:hexcolor/hexcolor.dart'; class NumberTextInputFormatter extends TextInputFormatter { @override @@ -70,8 +71,8 @@ class NewTextFields extends StatefulWidget { this.prefixIcon, this.bare = false, this.onTap, - this.fontSize = 16.0, - this.fontWeight = FontWeight.w700, + this.fontSize = 15.0, + this.fontWeight = FontWeight.w500, this.autoValidate = false, this.hintColor, this.isEnabled = true}) @@ -158,9 +159,15 @@ class _NewTextFieldsState extends State { duration: Duration(milliseconds: 300), decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), + border: Border.all( + color: HexColor('#707070'), + width: 0.30), color: Colors.white), child: Container( margin: EdgeInsets.only(top: 8), + padding: EdgeInsets.only(top: 8), + + child: TextFormField( enabled: widget.isEnabled, initialValue: widget.initialValue, @@ -190,7 +197,7 @@ class _NewTextFieldsState extends State { validator: widget.validator, onSaved: widget.onSaved, style: Theme.of(context).textTheme.body2.copyWith( - fontSize: widget.fontSize, fontWeight: widget.fontWeight), + fontSize: widget.fontSize, fontWeight: widget.fontWeight, color: Color(0xFF575757), fontFamily: 'Poppins'), inputFormatters: widget.keyboardType == TextInputType.phone ? [ WhitelistingTextInputFormatter.digitsOnly, @@ -200,7 +207,7 @@ class _NewTextFieldsState extends State { decoration: InputDecoration( labelText: widget.hintText, labelStyle: - TextStyle(color: Theme.of(context).textTheme.bodyText1.color), + TextStyle(color: Color(0xFF2E303A), fontSize:15,fontWeight: FontWeight.w700), errorBorder: OutlineInputBorder( borderSide: BorderSide( color: Theme.of(context).errorColor.withOpacity(0.5),