merge-requests/399/head
Sultan Khan 5 years ago
commit 4ec8bcaa81

@ -287,6 +287,7 @@ const Map<String, Map<String, String>> localizedValues = {
'room': {'en': 'ROOM:', 'ar': 'الغرفة'}, 'room': {'en': 'ROOM:', 'ar': 'الغرفة'},
'bed': {'en': 'BED:', 'ar': 'السرير'}, 'bed': {'en': 'BED:', 'ar': 'السرير'},
'next': {'en': 'Next', 'ar': 'التالي'}, 'next': {'en': 'Next', 'ar': 'التالي'},
'previous': {'en': 'PREVIOUS', 'ar': 'السابق'},
'healthRecordInformation': { 'healthRecordInformation': {
'en': 'HEALTH RECORD INFORMATION', 'en': 'HEALTH RECORD INFORMATION',
'ar': 'معلومات السجل الصحي' 'ar': 'معلومات السجل الصحي'
@ -708,7 +709,7 @@ const Map<String, Map<String, String>> localizedValues = {
'ar': " : استجابة الإحالة" 'ar': " : استجابة الإحالة"
}, },
'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"}, 'estimatedCost': {'en': "Estimated Cost", 'ar': "التكلفة المتوقعة"},
'diagnosisDetail': {'en': "Diagnosis Detail : ", 'ar': "تفاصيل التشخيص"}, 'diagnosisDetail': {'en': "Diagnosis Details", 'ar': "تفاصيل التشخيص"},
'referralSuccessMsgAccept': { 'referralSuccessMsgAccept': {
'en': "Referral Accepted Successfully", 'en': "Referral Accepted Successfully",
'ar': "تم قبول الإحالة بنجاح" 'ar': "تم قبول الإحالة بنجاح"

@ -1,10 +1,17 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/model/Prescription_model.dart'; import 'package:doctor_app_flutter/core/model/Prescription_model.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/Prescriptions.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/perscription_pharmacy.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescription_report_enh.dart';
import 'package:doctor_app_flutter/core/model/Prescriptions/prescriptions_order.dart';
import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart'; import 'package:doctor_app_flutter/core/model/get_medication_response_model.dart';
import 'package:doctor_app_flutter/core/model/medical_file_model.dart'; import 'package:doctor_app_flutter/core/model/medical_file_model.dart';
import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart'; import 'package:doctor_app_flutter/core/model/post_prescrition_req_model.dart';
import 'package:doctor_app_flutter/core/model/search_drug_model.dart'; import 'package:doctor_app_flutter/core/model/search_drug_model.dart';
import 'package:doctor_app_flutter/core/service/prescription_service.dart'; import 'package:doctor_app_flutter/core/service/prescription_service.dart';
import 'package:doctor_app_flutter/core/service/prescriptions_service.dart';
import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/base_view_model.dart';
import 'package:doctor_app_flutter/locator.dart'; import 'package:doctor_app_flutter/locator.dart';
import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetAllergiesResModel.dart';
@ -12,8 +19,10 @@ import 'package:doctor_app_flutter/models/SOAP/GetAssessmentResModel.dart';
import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart'; import 'package:doctor_app_flutter/models/SOAP/master_key_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart'; import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
import 'package:flutter/cupertino.dart';
class PrescriptionViewModel extends BaseViewModel { class PrescriptionViewModel extends BaseViewModel {
FilterType filterType = FilterType.Clinic;
bool hasError = false; bool hasError = false;
PrescriptionService _prescriptionService = locator<PrescriptionService>(); PrescriptionService _prescriptionService = locator<PrescriptionService>();
List<GetMedicationResponseModel> get allMedicationList => List<GetMedicationResponseModel> get allMedicationList =>
@ -26,6 +35,26 @@ class PrescriptionViewModel extends BaseViewModel {
List<dynamic> get drugToDrug => _prescriptionService.drugToDrugList; List<dynamic> get drugToDrug => _prescriptionService.drugToDrugList;
List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList; List<dynamic> get itemMedicineList => _prescriptionService.itemMedicineList;
PrescriptionsService _prescriptionsService = locator<PrescriptionsService>();
List<PrescriptionsList> _prescriptionsOrderListClinic = List();
List<PrescriptionsList> _prescriptionsOrderListHospital = List();
List<PrescriptionReport> get prescriptionReportList =>
_prescriptionsService.prescriptionReportList;
List<Prescriptions> get prescriptionsList =>
_prescriptionsService.prescriptionsList;
List<PharmacyPrescriptions> get pharmacyPrescriptionsList =>
_prescriptionsService.pharmacyPrescriptionsList;
List<PrescriptionReportEnh> get prescriptionReportEnhList =>
_prescriptionsService.prescriptionReportEnhList;
List<PrescriptionsList> get prescriptionsOrderList =>
filterType == FilterType.Clinic
? _prescriptionsOrderListClinic
: _prescriptionsOrderListHospital;
Future getItem({int itemID}) async { Future getItem({int itemID}) async {
hasError = false; hasError = false;
@ -119,4 +148,113 @@ class PrescriptionViewModel extends BaseViewModel {
} else } else
setState(ViewState.Idle); setState(ViewState.Idle);
} }
setFilterType(FilterType filterType) {
this.filterType = filterType;
notifyListeners();
}
getPrescriptionReport(
{Prescriptions prescriptions,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReport(
prescriptions: prescriptions, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
getListPharmacyForPrescriptions(
{int itemId, @required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getListPharmacyForPrescriptions(
itemId: itemId, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
void _filterList() {
_prescriptionsService.prescriptionsList.forEach((element) {
/// PrescriptionsList list sort clinic
List<PrescriptionsList> prescriptionsByClinic =
_prescriptionsOrderListClinic
.where((elementClinic) =>
elementClinic.filterName == element.clinicDescription)
.toList();
if (prescriptionsByClinic.length != 0) {
_prescriptionsOrderListClinic[
_prescriptionsOrderListClinic.indexOf(prescriptionsByClinic[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListClinic.add(PrescriptionsList(
filterName: element.clinicDescription, prescriptions: element));
}
/// PrescriptionsList list sort via hospital
List<PrescriptionsList> prescriptionsByHospital =
_prescriptionsOrderListHospital
.where(
(elementClinic) => elementClinic.filterName == element.name,
)
.toList();
if (prescriptionsByHospital.length != 0) {
_prescriptionsOrderListHospital[_prescriptionsOrderListHospital
.indexOf(prescriptionsByHospital[0])]
.prescriptionsList
.add(element);
} else {
_prescriptionsOrderListHospital.add(PrescriptionsList(
filterName: element.name, prescriptions: element));
}
});
}
getPrescriptionReportEnh(
{PrescriptionsOrder prescriptionsOrder,
@required PatiantInformtion patient}) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptionReportEnh(
prescriptionsOrder: prescriptionsOrder, patient: patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
_getPrescriptionsOrders() async {
await _prescriptionsService.getPrescriptionsOrders();
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.ErrorLocal);
} else {
setState(ViewState.Idle);
}
}
getPrescriptions(PatiantInformtion patient) async {
setState(ViewState.Busy);
await _prescriptionsService.getPrescriptions(patient);
if (_prescriptionsService.hasError) {
error = _prescriptionsService.error;
setState(ViewState.Error);
} else {
_filterList();
await _getPrescriptionsOrders();
setState(ViewState.Idle);
}
}
} }

@ -40,6 +40,10 @@ class ProcedureViewModel extends BaseViewModel {
filterType == FilterType.Clinic filterType == FilterType.Clinic
? _finalRadiologyListClinic ? _finalRadiologyListClinic
: _finalRadiologyListHospital; : _finalRadiologyListHospital;
List<FinalRadiology> get radiologyList =>
_radiologyService.finalRadiologyList;
List<LabOrderResult> get labOrdersResultsList => List<LabOrderResult> get labOrdersResultsList =>
_labsService.labOrdersResultsList; _labsService.labOrdersResultsList;

@ -61,7 +61,7 @@ class MyApp extends StatelessWidget {
primarySwatch: Colors.grey, primarySwatch: Colors.grey,
primaryColor: Colors.grey, primaryColor: Colors.grey,
buttonColor: HexColor('#B8382C'), buttonColor: HexColor('#B8382C'),
fontFamily: 'WorkSans', fontFamily: 'Poppins',
dividerColor: Colors.grey[350], dividerColor: Colors.grey[350],
backgroundColor: Color.fromRGBO(255, 255, 255, 1), backgroundColor: Color.fromRGBO(255, 255, 255, 1),
), ),

@ -58,7 +58,7 @@ class _AdmissionRequestThirdScreenState
isShowAppBar: false, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: (){ onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) { if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus(); currentFocus.unfocus();
@ -96,8 +96,8 @@ class _AdmissionRequestThirdScreenState
), ),
), ),
Container( Container(
margin: EdgeInsets.symmetric( margin:
vertical: 0, horizontal: 16), EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -112,25 +112,20 @@ class _AdmissionRequestThirdScreenState
height: 10, height: 10,
), ),
AppTextFieldCustom( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
hintText: "test field", hintText: TranslationBase.of(context).clinic,
isDropDown: true, isDropDown: true,
controller: _sickLeaveCommentsController, dropDownText: _selectedClinic != null
), ? _selectedClinic['clinicGroupName']
SizedBox( : null,
height: 10, enabled: false,
), onClick: model.clinicList != null &&
Container(
height: screenSize.height * 0.070,
child: InkWell(
onTap: model.clinicList != null &&
model.clinicList.length > 0 model.clinicList.length > 0
? () { ? () {
openListDialogField( openListDialogField(
'clinicGroupName', 'clinicGroupName',
'clinicID', 'clinicID',
model.clinicList, model.clinicList, (selectedValue) {
(selectedValue) {
setState(() { setState(() {
_selectedClinic = selectedValue; _selectedClinic = selectedValue;
}); });
@ -147,11 +142,9 @@ class _AdmissionRequestThirdScreenState
openListDialogField( openListDialogField(
'clinicGroupName', 'clinicGroupName',
'clinicID', 'clinicID',
model.clinicList, model.clinicList, (selectedValue) {
(selectedValue) {
setState(() { setState(() {
_selectedClinic = _selectedClinic = selectedValue;
selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state ==
@ -163,64 +156,45 @@ class _AdmissionRequestThirdScreenState
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.clinic,
_selectedClinic != null
? _selectedClinic[
'clinicGroupName']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 20, height: 20,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).doctor,
onTap: _selectedClinic != null isDropDown: true,
dropDownText: _selectedDoctor != null
? _selectedDoctor['DoctorName']
: null,
enabled: false,
onClick: _selectedClinic != null
? model.doctorsList != null && ? model.doctorsList != null &&
model.doctorsList.length > 0 model.doctorsList.length > 0
? () { ? () {
openListDialogField( openListDialogField('DoctorName',
'DoctorName', 'DoctorID', model.doctorsList,
'DoctorID',
model.doctorsList,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
_selectedDoctor = _selectedDoctor = selectedValue;
selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils GifLoaderDialogUtils.showMyDialog(
.showMyDialog(context); context);
await model await model
.getClinicDoctors( .getClinicDoctors(
_selectedClinic[ _selectedClinic['clinicID'])
'clinicID']) .then((_) => GifLoaderDialogUtils
.then((_) => .hideDialog(context));
GifLoaderDialogUtils if (model.state == ViewState.Idle &&
.hideDialog( model.doctorsList.length > 0) {
context)); openListDialogField('DoctorName',
if (model.state == 'DoctorID', model.doctorsList,
ViewState.Idle &&
model.doctorsList.length >
0) {
openListDialogField(
'DoctorName',
'DoctorID',
model.doctorsList,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
_selectedDoctor = _selectedDoctor = selectedValue;
selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state ==
@ -233,27 +207,15 @@ class _AdmissionRequestThirdScreenState
} }
} }
: null, : null,
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.doctor,
_selectedDoctor != null
? _selectedDoctor[
'DoctorName']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 16, height: 16,
), ),
AppText( AppText(
TranslationBase.of(context).patientDetails, TranslationBase.of(context).patientDetails,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -262,82 +224,79 @@ class _AdmissionRequestThirdScreenState
title: AppText( title: AppText(
TranslationBase.of(context).patientPregnant, TranslationBase.of(context).patientPregnant,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.0,
), ),
value: _patientPregnant, value: _patientPregnant,
activeColor: HexColor("#D02127"),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
_patientPregnant = newValue; _patientPregnant = newValue;
}); });
}, },
controlAffinity: controlAffinity: ListTileControlAffinity.leading,
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
CheckboxListTile( CheckboxListTile(
title: AppText( title: AppText(
TranslationBase.of(context) TranslationBase.of(context).isSickLeaveRequired,
.isSickLeaveRequired,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: SizeConfig.textMultiplier * 2.1, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.0,
), ),
value: _isSickLeaveRequired, value: _isSickLeaveRequired,
activeColor: HexColor("#D02127"),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
_isSickLeaveRequired = newValue; _isSickLeaveRequired = newValue;
}); });
}, },
controlAffinity: controlAffinity: ListTileControlAffinity.leading,
ListTileControlAffinity.leading,
contentPadding: EdgeInsets.all(0), contentPadding: EdgeInsets.all(0),
), ),
Container( AppTextFieldCustom(
child: TextField( hintText:
decoration: TranslationBase.of(context).sickLeaveComments,
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.sickLeaveComments,
null,
false),
enabled: true,
controller: _sickLeaveCommentsController, controller: _sickLeaveCommentsController,
keyboardType: TextInputType.text,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
)), inputType: TextInputType.multiline,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).dietType,
onTap: model.dietTypesList != null && isDropDown: true,
dropDownText: _selectedDietType != null
? _selectedDietType['nameEn']
: null,
enabled: false,
onClick: model.dietTypesList != null &&
model.dietTypesList.length > 0 model.dietTypesList.length > 0
? () { ? () {
openListDialogField('nameEn', 'id', openListDialogField(
model.dietTypesList, 'nameEn', 'id', model.dietTypesList,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
_selectedDietType = _selectedDietType = selectedValue;
selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
context); context);
await model.getDietTypes().then( await model.getDietTypes().then((_) =>
(_) => GifLoaderDialogUtils GifLoaderDialogUtils.hideDialog(
.hideDialog(context)); context));
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&
model.dietTypesList.length > model.dietTypesList.length > 0) {
0) { openListDialogField(
openListDialogField('nameEn', 'nameEn', 'id', model.dietTypesList,
'id', model.dietTypesList,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
_selectedDietType = _selectedDietType = selectedValue;
selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state ==
@ -349,70 +308,38 @@ class _AdmissionRequestThirdScreenState
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.dietType,
_selectedDietType != null
? _selectedDietType['nameEn']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText:
decoration: TranslationBase.of(context).dietTypeRemarks,
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.dietTypeRemarks,
null,
false),
enabled: true,
controller: _dietTypeRemarksController, controller: _dietTypeRemarksController,
keyboardType: TextInputType.text,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), inputType: TextInputType.multiline,
),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context).pastMedicalHistory,
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.pastMedicalHistory,
null,
false),
enabled: true,
controller: _postMedicalHistoryController, controller: _postMedicalHistoryController,
keyboardType: TextInputType.text, minLines: 4,
minLines: 2, maxLines: 6,
maxLines: 4, inputType: TextInputType.multiline,
)), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context).pastSurgicalHistory,
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.pastSurgicalHistory,
null,
false),
enabled: true,
controller: _postSurgicalHistoryController, controller: _postSurgicalHistoryController,
keyboardType: TextInputType.text,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
)), inputType: TextInputType.multiline,
),
], ],
), ),
), ),
@ -424,7 +351,7 @@ class _AdmissionRequestThirdScreenState
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
color: HexColor("#B8382B"), color: HexColor("#D02127"),
onPressed: () { onPressed: () {
model.admissionRequestData = AdmissionRequest(); model.admissionRequestData = AdmissionRequest();
if (_selectedClinic != null && if (_selectedClinic != null &&
@ -436,8 +363,7 @@ class _AdmissionRequestThirdScreenState
patient.patientMRN; patient.patientMRN;
model.admissionRequestData.appointmentNo = model.admissionRequestData.appointmentNo =
patient.appointmentNo; patient.appointmentNo;
model.admissionRequestData.episodeID = model.admissionRequestData.episodeID = patient.episodeNo;
patient.episodeNo;
model.admissionRequestData.admissionRequestNo = 0; model.admissionRequestData.admissionRequestNo = 0;
model.admissionRequestData.admitToClinic = model.admissionRequestData.admitToClinic =
@ -445,8 +371,7 @@ class _AdmissionRequestThirdScreenState
model.admissionRequestData.mrpDoctorID = model.admissionRequestData.mrpDoctorID =
_selectedDoctor['DoctorID']; _selectedDoctor['DoctorID'];
model.admissionRequestData.isPregnant = model.admissionRequestData.isPregnant = _patientPregnant;
_patientPregnant;
model.admissionRequestData.isSickLeaveRequired = model.admissionRequestData.isSickLeaveRequired =
_isSickLeaveRequired; _isSickLeaveRequired;
model.admissionRequestData.sickLeaveComments = model.admissionRequestData.sickLeaveComments =
@ -463,10 +388,11 @@ class _AdmissionRequestThirdScreenState
_postMedicalHistoryController.text; _postMedicalHistoryController.text;
model.admissionRequestData.pastSurgicalHistory = model.admissionRequestData.pastSurgicalHistory =
_postSurgicalHistoryController.text; _postSurgicalHistoryController.text;
Navigator.of(context).pushNamed( Navigator.of(context)
PATIENT_ADMISSION_REQUEST_2, .pushNamed(PATIENT_ADMISSION_REQUEST_2, arguments: {
arguments: {
'patient': patient, 'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'admission-data': model.admissionRequestData 'admission-data': model.admissionRequestData
}); });
} else { } else {

@ -7,11 +7,12 @@ import 'package:doctor_app_flutter/core/viewModel/patient-admission-request-view
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -32,11 +33,6 @@ class AdmissionRequestThirdScreen extends StatefulWidget {
class _AdmissionRequestThirdScreenState class _AdmissionRequestThirdScreenState
extends State<AdmissionRequestThirdScreen> { extends State<AdmissionRequestThirdScreen> {
final _treatmentLineController = TextEditingController();
final _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController();
dynamic _selectedAdmissionType;
dynamic _selectedDiagnosis; dynamic _selectedDiagnosis;
dynamic _selectedIcd; dynamic _selectedIcd;
dynamic _selectedDiagnosisType; dynamic _selectedDiagnosisType;
@ -45,6 +41,8 @@ class _AdmissionRequestThirdScreenState
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
AdmissionRequest admissionRequest = routeArgs['admission-data']; AdmissionRequest admissionRequest = routeArgs['admission-data'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -53,6 +51,7 @@ class _AdmissionRequestThirdScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -68,130 +67,51 @@ class _AdmissionRequestThirdScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container( Container(
margin: margin: EdgeInsets.all(16.0),
EdgeInsets.symmetric(vertical: 16, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( AppText(
height: 10, "${TranslationBase.of(context).admission}",
), fontFamily: 'Poppins',
Container( fontSize: SizeConfig.textMultiplier * 1.6,
child: TextField( fontWeight: FontWeight.w600,
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).treatmentLine,
null,
false),
enabled: true,
controller: _treatmentLineController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
), ),
Container( AppText(
child: TextField( "${TranslationBase.of(context).request}",
decoration: Helpers.textFieldSelectorDecoration( fontFamily: 'Poppins',
TranslationBase.of(context).complications, fontSize: SizeConfig.textMultiplier * 3,
null, fontWeight: FontWeight.bold,
false), )
enabled: true, ],
controller: _complicationsController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
), ),
Container(
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).otherProcedure,
null,
false),
enabled: true,
controller: _otherProceduresController,
keyboardType: TextInputType.text,
minLines: 3,
maxLines: 5,
)),
SizedBox(
height: 10,
), ),
Container( Container(
height: screenSize.height * 0.070, margin: EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: InkWell( child: Column(
onTap: model.admissionTypeList != null && crossAxisAlignment: CrossAxisAlignment.start,
model.admissionTypeList.length > 0 children: [
? () {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getMasterLookup(MasterKeysService
.AdmissionRequestType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.admissionTypeList.length > 0) {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).admissionType,
_selectedAdmissionType != null
? _selectedAdmissionType['nameEn']
: null,
true),
enabled: false,
),
),
),
SizedBox(
height: 16,
),
AppText( AppText(
TranslationBase.of(context).diagnosisDetail, TranslationBase.of(context).diagnosisDetail,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).diagnosis,
onTap: model.diagnosisTypesList != null && dropDownText: _selectedDiagnosis != null
? _selectedDiagnosis['nameEn']
: null,
enabled: false,
isDropDown: true,
onClick: model.diagnosisTypesList != null &&
model.diagnosisTypesList.length > 0 model.diagnosisTypesList.length > 0
? () { ? () {
openListDialogField('nameEn', 'id', openListDialogField('nameEn', 'id',
@ -203,8 +123,7 @@ class _AdmissionRequestThirdScreenState
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context);
await model.getDiagnosis().then((_) => await model.getDiagnosis().then((_) =>
GifLoaderDialogUtils.hideDialog( GifLoaderDialogUtils.hideDialog(
context)); context));
@ -219,31 +138,25 @@ class _AdmissionRequestThirdScreenState
}); });
} else if (model.state == } else if (model.state ==
ViewState.ErrorLocal) { ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(model.error);
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).diagnosis,
_selectedDiagnosis != null
? _selectedDiagnosis['nameEn']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).icd,
onTap: model.icdCodes != null && dropDownText: _selectedIcd != null
? _selectedIcd['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.icdCodes != null &&
model.icdCodes.length > 0 model.icdCodes.length > 0
? () { ? () {
openListDialogField( openListDialogField(
@ -255,8 +168,7 @@ class _AdmissionRequestThirdScreenState
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context);
await model await model
.getICDCodes(patient.patientMRN) .getICDCodes(patient.patientMRN)
.then((_) => .then((_) =>
@ -265,57 +177,47 @@ class _AdmissionRequestThirdScreenState
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&
model.icdCodes.length > 0) { model.icdCodes.length > 0) {
openListDialogField( openListDialogField(
'description', 'description', 'code', model.icdCodes,
'code', (selectedValue) {
model.icdCodes, (selectedValue) {
setState(() { setState(() {
_selectedIcd = selectedValue; _selectedIcd = selectedValue;
}); });
}); });
} else if (model.state == } else if (model.state ==
ViewState.ErrorLocal) { ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(model.error);
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).icd,
_selectedIcd != null
? _selectedIcd['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).diagnoseType,
onTap: model.listOfDiagnosisSelectionTypes != dropDownText: _selectedDiagnosisType != null
? _selectedDiagnosisType['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.listOfDiagnosisSelectionTypes !=
null && null &&
model.listOfDiagnosisSelectionTypes model.listOfDiagnosisSelectionTypes.length >
.length >
0 0
? () { ? () {
openListDialogField('description', 'code', openListDialogField('description', 'code',
model.listOfDiagnosisSelectionTypes, model.listOfDiagnosisSelectionTypes,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
_selectedDiagnosisType = _selectedDiagnosisType = selectedValue;
selectedValue;
}); });
}); });
} }
: () async { : () async {
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(context);
context);
await model await model
.getMasterLookup(MasterKeysService .getMasterLookup(MasterKeysService
.DiagnosisSelectionType) .DiagnosisSelectionType)
@ -326,9 +228,7 @@ class _AdmissionRequestThirdScreenState
model.listOfDiagnosisSelectionTypes model.listOfDiagnosisSelectionTypes
.length > .length >
0) { 0) {
openListDialogField( openListDialogField('description', 'code',
'description',
'code',
model.listOfDiagnosisSelectionTypes, model.listOfDiagnosisSelectionTypes,
(selectedValue) { (selectedValue) {
setState(() { setState(() {
@ -338,23 +238,12 @@ class _AdmissionRequestThirdScreenState
}); });
} else if (model.state == } else if (model.state ==
ViewState.ErrorLocal) { ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(model.error);
model.error);
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).diagnoseType,
_selectedDiagnosisType != null
? _selectedDiagnosisType['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
@ -367,40 +256,46 @@ class _AdmissionRequestThirdScreenState
)), )),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), 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: () {
Navigator.pop(context);
},
),
),
SizedBox(
width: 10,
),
Expanded(
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).submit,
color: HexColor("#B8382B"), color: HexColor("#359846"),
onPressed: () async { onPressed: () async {
if (_treatmentLineController.text != "" && if (_selectedDiagnosis != null &&
_complicationsController.text != "" &&
_otherProceduresController.text != "" &&
_selectedAdmissionType != null &&
_selectedDiagnosis != null &&
_selectedIcd != null && _selectedIcd != null &&
_selectedDiagnosisType != null) { _selectedDiagnosisType != null) {
model.admissionRequestData = admissionRequest; model.admissionRequestData = admissionRequest;
model.admissionRequestData.mainLineOfTreatment =
_treatmentLineController.text;
model.admissionRequestData.complications =
_complicationsController.text;
model.admissionRequestData.otherProcedures =
_otherProceduresController.text;
model.admissionRequestData.admissionType =
_selectedAdmissionType['id'];
dynamic admissionRequestDiagnoses = [ dynamic admissionRequestDiagnoses = [
{ {
'diagnosisDescription': _selectedDiagnosis['nameEn'], 'diagnosisDescription':
_selectedDiagnosis['nameEn'],
'diagnosisType': _selectedDiagnosis['id'], 'diagnosisType': _selectedDiagnosis['id'],
'icdCode': _selectedIcd['code'], 'icdCode': _selectedIcd['code'],
'icdCodeDescription': _selectedIcd['description'], 'icdCodeDescription':
_selectedIcd['description'],
'type': _selectedDiagnosisType['code'], 'type': _selectedDiagnosisType['code'],
'remarks': "", 'remarks': "",
'isActive': true, 'isActive': true,
} }
]; ];
model.admissionRequestData.admissionRequestDiagnoses = model.admissionRequestData
.admissionRequestDiagnoses =
admissionRequestDiagnoses; admissionRequestDiagnoses;
await model.makeAdmissionRequest(); await model.makeAdmissionRequest();
@ -408,8 +303,10 @@ class _AdmissionRequestThirdScreenState
DrAppToastMsg.showErrorToast(model.error); DrAppToastMsg.showErrorToast(model.error);
} else { } else {
DrAppToastMsg.showSuccesToast( DrAppToastMsg.showSuccesToast(
TranslationBase.of(context).admissionRequestSuccessMsg); TranslationBase.of(context)
Navigator.popUntil(context, ModalRoute.withName(PATIENTS_PROFILE)); .admissionRequestSuccessMsg);
Navigator.popUntil(context,
ModalRoute.withName(PATIENTS_PROFILE));
} }
} else { } else {
DrAppToastMsg.showErrorToast( DrAppToastMsg.showErrorToast(
@ -421,6 +318,9 @@ class _AdmissionRequestThirdScreenState
], ],
), ),
), ),
],
),
),
), ),
); );
} }

@ -12,6 +12,8 @@ import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/patient-page-header-widget.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design.dart';
import 'package:doctor_app_flutter/widgets/shared/app-textfield-custom.dart';
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.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:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -36,17 +38,23 @@ class _AdmissionRequestSecondScreenState
final _estimatedCostController = TextEditingController(); final _estimatedCostController = TextEditingController();
final _expectedDaysController = TextEditingController(); final _expectedDaysController = TextEditingController();
final _otherDepartmentsInterventionsController = TextEditingController(); final _otherDepartmentsInterventionsController = TextEditingController();
final _treatmentLineController = TextEditingController();
final _complicationsController = TextEditingController();
final _otherProceduresController = TextEditingController();
DateTime _expectedAdmissionDate; DateTime _expectedAdmissionDate;
dynamic _selectedFloor; dynamic _selectedFloor;
dynamic _selectedWard; dynamic _selectedWard;
dynamic _selectedRoomCategory; dynamic _selectedRoomCategory;
dynamic _selectedAdmissionType;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType'];
AdmissionRequest admissionRequest = routeArgs['admission-data']; AdmissionRequest admissionRequest = routeArgs['admission-data'];
final screenSize = MediaQuery.of(context).size; final screenSize = MediaQuery.of(context).size;
@ -55,6 +63,7 @@ class _AdmissionRequestSecondScreenState
return BaseView<AdmissionRequestViewModel>( return BaseView<AdmissionRequestViewModel>(
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowAppBar: false,
appBarTitle: TranslationBase.of(context).admissionRequest, appBarTitle: TranslationBase.of(context).admissionRequest,
body: GestureDetector( body: GestureDetector(
onTap: () { onTap: () {
@ -70,110 +79,117 @@ class _AdmissionRequestSecondScreenState
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
PatientPageHeaderWidget(patient), PatientProfileHeaderNewDesign(
patient, patientType, arrivalType),
Container( Container(
margin: EdgeInsets.symmetric( margin: EdgeInsets.all(16.0),
vertical: 16, horizontal: 16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox( AppText(
height: 16, "${TranslationBase.of(context).admission}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.6,
fontWeight: FontWeight.w600,
), ),
AppText(
"${TranslationBase.of(context).request}",
fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 3,
fontWeight: FontWeight.bold,
)
],
),
),
Container(
margin:
EdgeInsets.symmetric(vertical: 0, horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText( AppText(
TranslationBase.of(context) TranslationBase.of(context)
.postPlansEstimatedCost, .postPlansEstimatedCost,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: TranslationBase.of(context).estimatedCost,
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.estimatedCost,
null,
false),
enabled: true,
controller: _estimatedCostController, controller: _estimatedCostController,
inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS)) RegExp(ONLY_NUMBERS))
], ],
keyboardType: TextInputType.number, ),
)),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context).postPlans,
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).postPlans,
null,
false),
enabled: true,
controller: _postPlansEstimatedCostController, controller: _postPlansEstimatedCostController,
keyboardType: TextInputType.text, inputType: TextInputType.multiline,
minLines: 4, minLines: 4,
maxLines: 6, maxLines: 6,
)), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
child: TextField( hintText: TranslationBase.of(context)
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.otherDepartmentsInterventions, .otherDepartmentsInterventions,
null,
false),
enabled: true,
controller: controller:
_otherDepartmentsInterventionsController, _otherDepartmentsInterventionsController,
keyboardType: TextInputType.multiline, inputType: TextInputType.multiline,
minLines: 2, minLines: 2,
maxLines: 4, maxLines: 4,
)), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppText( AppText(
TranslationBase.of(context).otherInformation, TranslationBase.of(context).otherInformation,
fontWeight: FontWeight.bold, fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 1.8,
fontWeight: FontWeight.w700,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: TextField( hintText:
decoration: TranslationBase.of(context).expectedDays,
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedDays,
null,
false),
enabled: true,
controller: _expectedDaysController, controller: _expectedDaysController,
inputType: TextInputType.number,
inputFormatters: [ inputFormatters: [
FilteringTextInputFormatter.allow( FilteringTextInputFormatter.allow(
RegExp(ONLY_NUMBERS)) RegExp(ONLY_NUMBERS))
], ],
keyboardType: TextInputType.number, ),
)),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context)
onTap: () { .expectedAdmissionDate,
dropDownText: _expectedAdmissionDate != null
? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
: null,
enabled: false,
isDropDown: true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
),
onClick: () {
if (_expectedAdmissionDate == null) { if (_expectedAdmissionDate == null) {
_expectedAdmissionDate = DateTime.now(); _expectedAdmissionDate = DateTime.now();
} }
@ -184,29 +200,19 @@ class _AdmissionRequestSecondScreenState
}); });
}); });
}, },
child: TextField(
decoration: Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.expectedAdmissionDate,
_expectedAdmissionDate != null
? "${DateUtils.convertStringToDateFormat(_expectedAdmissionDate.toString(), "yyyy-MM-dd")}"
: null,
true,
suffixIcon: Icon(
Icons.calendar_today,
color: Colors.black,
)),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).floor,
onTap: model.floorList != null && dropDownText: _selectedFloor != null
? _selectedFloor['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.floorList != null &&
model.floorList.length > 0 model.floorList.length > 0
? () { ? () {
openListDialogField( openListDialogField(
@ -226,9 +232,10 @@ class _AdmissionRequestSecondScreenState
context)); context));
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&
model.floorList.length > 0) { model.floorList.length > 0) {
openListDialogField('description', openListDialogField(
'floorID', model.floorList, 'description',
(selectedValue) { 'floorID',
model.floorList, (selectedValue) {
setState(() { setState(() {
_selectedFloor = selectedValue; _selectedFloor = selectedValue;
}); });
@ -242,25 +249,19 @@ class _AdmissionRequestSecondScreenState
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).floor,
_selectedFloor != null
? _selectedFloor['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText: TranslationBase.of(context).ward,
onTap: model.wardList != null && dropDownText: _selectedWard != null
? _selectedWard['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.wardList != null &&
model.wardList.length > 0 model.wardList.length > 0
? () { ? () {
openListDialogField( openListDialogField(
@ -283,8 +284,7 @@ class _AdmissionRequestSecondScreenState
openListDialogField( openListDialogField(
'description', 'description',
'nursingStationID', 'nursingStationID',
model.wardList, model.wardList, (selectedValue) {
(selectedValue) {
setState(() { setState(() {
_selectedWard = selectedValue; _selectedWard = selectedValue;
}); });
@ -298,25 +298,20 @@ class _AdmissionRequestSecondScreenState
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context).ward,
_selectedWard != null
? _selectedWard['description']
: null,
true),
enabled: false,
),
),
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
Container( AppTextFieldCustom(
height: screenSize.height * 0.070, height: screenSize.height * 0.075,
child: InkWell( hintText:
onTap: model.roomCategoryList != null && TranslationBase.of(context).roomCategory,
dropDownText: _selectedRoomCategory != null
? _selectedRoomCategory['description']
: null,
enabled: false,
isDropDown: true,
onClick: model.roomCategoryList != null &&
model.roomCategoryList.length > 0 model.roomCategoryList.length > 0
? () { ? () {
openListDialogField( openListDialogField(
@ -334,11 +329,11 @@ class _AdmissionRequestSecondScreenState
GifLoaderDialogUtils.showMyDialog( GifLoaderDialogUtils.showMyDialog(
context); context);
await model.getRoomCategories().then( await model.getRoomCategories().then(
(_) => GifLoaderDialogUtils (_) =>
.hideDialog(context)); GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle && if (model.state == ViewState.Idle &&
model.roomCategoryList.length > model.roomCategoryList.length > 0) {
0) {
openListDialogField( openListDialogField(
'description', 'description',
'categoryID', 'categoryID',
@ -358,23 +353,94 @@ class _AdmissionRequestSecondScreenState
"Empty List"); "Empty List");
} }
}, },
child: TextField(
decoration:
Helpers.textFieldSelectorDecoration(
TranslationBase.of(context)
.roomCategory,
_selectedRoomCategory != null
? _selectedRoomCategory[
'description']
: null,
true),
enabled: false,
), ),
SizedBox(
height: 10,
), ),
AppTextFieldCustom(
hintText:
TranslationBase.of(context).treatmentLine,
controller: _treatmentLineController,
inputType: TextInputType.multiline,
minLines: 3,
maxLines: 5,
), ),
SizedBox( SizedBox(
height: 10, height: 10,
), ),
AppTextFieldCustom(
hintText:
TranslationBase.of(context).complications,
controller: _complicationsController,
inputType: TextInputType.multiline,
minLines: 3,
maxLines: 5,
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
hintText:
TranslationBase.of(context).otherProcedure,
controller: _otherProceduresController,
inputType: TextInputType.multiline,
minLines: 3,
maxLines: 5,
),
SizedBox(
height: 10,
),
AppTextFieldCustom(
height: screenSize.height * 0.075,
hintText:
TranslationBase.of(context).admissionType,
dropDownText: _selectedAdmissionType != null
? _selectedAdmissionType['nameEn']
: null,
enabled: false,
isDropDown: true,
onClick: model.admissionTypeList != null &&
model.admissionTypeList.length > 0
? () {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
}
: () async {
GifLoaderDialogUtils.showMyDialog(
context);
await model
.getMasterLookup(MasterKeysService
.AdmissionRequestType)
.then((_) =>
GifLoaderDialogUtils.hideDialog(
context));
if (model.state == ViewState.Idle &&
model.admissionTypeList.length >
0) {
openListDialogField('nameEn', 'id',
model.admissionTypeList,
(selectedValue) {
setState(() {
_selectedAdmissionType =
selectedValue;
});
});
} else if (model.state ==
ViewState.ErrorLocal) {
DrAppToastMsg.showErrorToast(
model.error);
} else {
DrAppToastMsg.showErrorToast(
"Empty List");
}
},
),
], ],
), ),
), ),
@ -384,23 +450,45 @@ class _AdmissionRequestSecondScreenState
), ),
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 8), 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: () {
Navigator.pop(context);
},
),
),
SizedBox(
width: 10,
),
Expanded(
child: AppButton( child: AppButton(
title: TranslationBase.of(context).next, title: TranslationBase.of(context).next,
color: HexColor("#B8382B"), color: HexColor("#D02127"),
onPressed: () async { onPressed: () async {
if (_estimatedCostController.text != "" && if (_estimatedCostController.text != "" &&
_postPlansEstimatedCostController.text != "" && _postPlansEstimatedCostController.text != "" &&
_expectedDaysController.text != "" && _expectedDaysController.text != "" &&
_expectedAdmissionDate != null && _expectedAdmissionDate != null &&
_otherDepartmentsInterventionsController.text != "" && _otherDepartmentsInterventionsController.text !=
"" &&
_selectedFloor != null && _selectedFloor != null &&
_selectedRoomCategory != _selectedRoomCategory !=
null /*_selectedWard is not required*/) { null /*_selectedWard is not required*/ &&
_treatmentLineController.text != "" &&
_complicationsController.text != "" &&
_otherProceduresController.text != "" &&
_selectedAdmissionType != null) {
model.admissionRequestData = admissionRequest; model.admissionRequestData = admissionRequest;
model.admissionRequestData.estimatedCost = model.admissionRequestData.estimatedCost =
int.parse(_estimatedCostController.text); int.parse(_estimatedCostController.text);
model.admissionRequestData.elementsForImprovement = model.admissionRequestData
.elementsForImprovement =
_postPlansEstimatedCostController.text; _postPlansEstimatedCostController.text;
model.admissionRequestData.expectedDays = model.admissionRequestData.expectedDays =
@ -419,11 +507,24 @@ class _AdmissionRequestSecondScreenState
model.admissionRequestData.roomCategoryID = model.admissionRequestData.roomCategoryID =
_selectedRoomCategory['categoryID']; _selectedRoomCategory['categoryID'];
model.admissionRequestData.admissionRequestProcedures = model.admissionRequestData
[]; .admissionRequestProcedures = [];
Navigator.of(context)
.pushNamed(PATIENT_ADMISSION_REQUEST_3, arguments: { model.admissionRequestData.mainLineOfTreatment =
_treatmentLineController.text;
model.admissionRequestData.complications =
_complicationsController.text;
model.admissionRequestData.otherProcedures =
_otherProceduresController.text;
model.admissionRequestData.admissionType =
_selectedAdmissionType['id'];
Navigator.of(context).pushNamed(
PATIENT_ADMISSION_REQUEST_3,
arguments: {
'patient': patient, 'patient': patient,
'patientType': patientType,
'arrivalType': arrivalType,
'admission-data': model.admissionRequestData 'admission-data': model.admissionRequestData
}); });
} else { } else {
@ -435,6 +536,9 @@ class _AdmissionRequestSecondScreenState
), ),
], ],
), ),
),
],
),
)), )),
); );
} }

@ -37,6 +37,7 @@ class RadiologyDetailsPage extends StatelessWidget {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[ children: <Widget>[
PatientProfileHeaderWhitAppointment(patient: patient, PatientProfileHeaderWhitAppointment(patient: patient,
patientType: patientType??"0", patientType: patientType??"0",
arrivalType: arrivalType??"0", arrivalType: arrivalType??"0",
@ -46,10 +47,9 @@ class RadiologyDetailsPage extends StatelessWidget {
profileUrl: finalRadiology.doctorImageURL, profileUrl: finalRadiology.doctorImageURL,
invoiceNO: finalRadiology.invoiceNo.toString(), invoiceNO: finalRadiology.invoiceNo.toString(),
), ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.2,
),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
@ -60,14 +60,18 @@ class RadiologyDetailsPage extends StatelessWidget {
SizedBox(height: 5,), SizedBox(height: 5,),
Texts(TranslationBase.of(context).generalResult), Texts(TranslationBase.of(context).generalResult),
SizedBox(height: 5,), SizedBox(height: 5,),
Texts( Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'${finalRadiology.reportData}', '${finalRadiology.reportData}',
textAlign: TextAlign.start, textAlign: TextAlign.start,
fontSize: 17, fontSize: 17,
color: Colors.grey, color: Colors.grey,
), ),
),
SizedBox(height: 25,), SizedBox(height: 25,),
Container( Center(
child: Container(
width: MediaQuery.of(context).size.width * 0.8, width: MediaQuery.of(context).size.width * 0.8,
child: Button( child: Button(
color: Colors.red, color: Colors.red,
@ -77,6 +81,7 @@ class RadiologyDetailsPage extends StatelessWidget {
title: TranslationBase.of(context).openRad, title: TranslationBase.of(context).openRad,
), ),
), ),
),
], ],
), ),
), ),

@ -26,7 +26,7 @@ class RadiologyHomePage extends StatelessWidget {
PatiantInformtion patient = routeArgs['patient']; PatiantInformtion patient = routeArgs['patient'];
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProcedureViewModel model2 = ProcedureViewModel();
return BaseView<ProcedureViewModel>( return BaseView<ProcedureViewModel>(
onModelReady: (model) => model.getPatientRadOrders(patient), onModelReady: (model) => model.getPatientRadOrders(patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
@ -39,7 +39,7 @@ class RadiologyHomePage extends StatelessWidget {
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign( PatientProfileHeaderNewDesign(
patient, patient.patientType.toString() ?? '0', patientType), patient, patient.patientType.toString() ?? '0', arrivalType),
SizedBox( SizedBox(
height: 12, height: 12,
), ),
@ -108,38 +108,26 @@ class RadiologyHomePage extends StatelessWidget {
), ),
), ),
), ),
...List.generate( ...List.generate(model.radiologyList.length, (index) => InkWell(
model.finalRadiologyList.length,
(index) => AppExpandableNotifier(
title: model.finalRadiologyList[index].filterName,
bodyWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: model
.finalRadiologyList[index].finalRadiologyList
.map((radiology) {
return InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: RadiologyDetailsPage( page: RadiologyDetailsPage(
finalRadiology: radiology, finalRadiology: model.radiologyList[index],
patient: patient, patient: patient,
), ),
), ),
), ),
child: DoctorCard( child: DoctorCard(
doctorName: radiology.doctorName, doctorName: model.radiologyList[index].doctorName,
profileUrl: radiology.doctorImageURL, profileUrl: model.radiologyList[index].doctorImageURL,
invoiceNO: '${radiology.invoiceNo}', invoiceNO: '${model.radiologyList[index].invoiceNo}',
branch: '${radiology.projectName}', branch: '${model.radiologyList[index].projectName}',
appointmentDate: radiology.orderDate, appointmentDate: model.radiologyList[index].orderDate,
orderNo: radiology.orderNo.toString(), orderNo: model.radiologyList[index].orderNo.toString(),
), ),
);
}).toList(),
)), )),
)
], ],
), ),
), ),

@ -80,6 +80,7 @@ postProcedure(
if (model.state == ViewState.ErrorLocal) { if (model.state == ViewState.ErrorLocal) {
helpers.showErrorToast(model.error); helpers.showErrorToast(model.error);
} else if (model.state == ViewState.Idle) { } else if (model.state == ViewState.Idle) {
model.getPrescriptions(patient);
DrAppToastMsg.showSuccesToast('Medication has been added'); DrAppToastMsg.showSuccesToast('Medication has been added');
} }
} }

@ -5,7 +5,9 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_details_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_details_page.dart';
import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient_profile_header_with_appointment_card.dart';
import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart'; import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
@ -15,7 +17,9 @@ import 'package:flutter/material.dart';
class PrescriptionItemsPage extends StatelessWidget { class PrescriptionItemsPage extends StatelessWidget {
final Prescriptions prescriptions; final Prescriptions prescriptions;
final PatiantInformtion patient; final PatiantInformtion patient;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient}); final String patientType;
final String arrivalType;
PrescriptionItemsPage({Key key, this.prescriptions, this.patient, this.patientType, this.arrivalType});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -23,14 +27,28 @@ class PrescriptionItemsPage extends StatelessWidget {
onModelReady: (model) => onModelReady: (model) =>
model.getPrescriptionReport(prescriptions: prescriptions,patient: patient), model.getPrescriptionReport(prescriptions: prescriptions,patient: patient),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: false,
appBarTitle: TranslationBase.of(context).prescriptions,
baseViewModel: model, baseViewModel: model,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
child: Column( child: Column(
children: [ children: [
Container( PatientProfileHeaderWhitAppointment(patient: patient,
patientType: patientType??"0",
arrivalType: arrivalType??"0",
branch: '',
clinic: prescriptions.clinicDescription,
isPrescriptions: true,
appointmentDate: DateUtils.getDateTimeFromServerFormat(prescriptions.appointmentDate),
doctorName: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL,
// invoiceNO: widget.patientLabOrders.invoiceNo,
),
if (!prescriptions.isInOutPatient)
...List.generate(
model.prescriptionReportList.length,
(index) => Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: Colors.white, color: Colors.white,
@ -43,7 +61,8 @@ class PrescriptionItemsPage extends StatelessWidget {
children: [ children: [
Container( Container(
margin: EdgeInsets.only(left: 18,right: 18), margin: EdgeInsets.only(left: 18,right: 18),
child: Texts('Name ',bold: true,)), child: Texts(model.prescriptionReportList[index].itemDescription.isNotEmpty ? model.prescriptionReportList[index].itemDescription : model.prescriptionReportList[index].itemDescriptionN,bold: true,)),
SizedBox(height: 12,),
Row( Row(
children: [ children: [
SizedBox(width: 18,), SizedBox(width: 18,),
@ -52,17 +71,34 @@ class PrescriptionItemsPage extends StatelessWidget {
shape: BoxShape.circle, shape: BoxShape.circle,
border: Border.all(width: 0.5,color: Colors.grey) border: Border.all(width: 0.5,color: Colors.grey)
), ),
height: 45, height: 55,
width: 45, width: 55,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Image.network(
model.prescriptionReportList[index].imageSRCUrl,
fit: BoxFit.cover,
),
),
), ),
SizedBox(width: 10,), SizedBox(width: 10,),
Expanded(child: Column( Expanded(child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Route: Monthly'), Row(
Texts('Does: 2 Time a day with 1 hour gap'), children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportList[index].routeN)),
],
),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportList[index].frequencyN ?? ''),
],
),
SizedBox(height: 12,), SizedBox(height: 12,),
Texts('Note: 2 Time a day with 1 hour gap'), Texts(model.prescriptionReportList[index].remarks ?? ''),
], ],
),) ),)
@ -72,144 +108,70 @@ class PrescriptionItemsPage extends StatelessWidget {
], ],
), ),
), ),
), ))
if (!prescriptions.isInOutPatient) else
...List.generate( ...List.generate(
model.prescriptionReportList.length, model.prescriptionReportEnhList.length,
(index) => InkWell( (index) => Container(
onTap: () => Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport:
model.prescriptionReportList[index],
),
),
),
child: Container(
width: double.infinity,
margin:
EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(
color: Colors.grey[200], width: 0.5),
), ),
child: Row( margin: EdgeInsets.all(12),
children: <Widget>[
ClipRRect(
borderRadius:
BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.prescriptionReportList[index]
.imageSRCUrl,
fit: BoxFit.cover,
width: 60,
height: 70,
),
),
SizedBox(
width: 10,
),
Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Column(
child: Texts(model crossAxisAlignment: CrossAxisAlignment.start,
.prescriptionReportList[index] children: [
.itemDescription Container(
.isNotEmpty margin: EdgeInsets.only(left: 18,right: 18),
? model.prescriptionReportList[index] child: Texts(model.prescriptionReportEnhList[index].itemDescription,bold: true,),),
.itemDescription SizedBox(height: 12,),
: model.prescriptionReportList[index] Row(
.itemDescriptionN)), mainAxisAlignment: MainAxisAlignment.start,
)), crossAxisAlignment: CrossAxisAlignment.center,
Icon( children: [
Icons.arrow_forward_ios, SizedBox(width: 18,),
size: 18, Container(
color: Colors.grey[500], decoration: BoxDecoration(
) shape: BoxShape.circle,
], border: Border.all(width: 0.5,color: Colors.grey)
),
),
))
else
...List.generate(
model.prescriptionReportEnhList.length,
(index) => InkWell(
onTap: () {
PrescriptionReport prescriptionReport =
PrescriptionReport(
imageSRCUrl: model
.prescriptionReportEnhList[index].imageSRCUrl,
itemDescription: model
.prescriptionReportEnhList[index]
.itemDescription,
itemDescriptionN: model
.prescriptionReportEnhList[index]
.itemDescription,
routeN:
model.prescriptionReportEnhList[index].route,
frequency: model
.prescriptionReportEnhList[index].frequency,
frequencyN: model
.prescriptionReportEnhList[index].frequency,
doseDailyQuantity: model
.prescriptionReportEnhList[index]
.doseDailyQuantity,
days: model.prescriptionReportEnhList[index].days,
itemID:
model.prescriptionReportEnhList[index].itemID,
remarks: model
.prescriptionReportEnhList[index].remarks);
Navigator.push(
context,
FadePage(
page: PrescriptionDetailsPage(
prescriptionReport: prescriptionReport,
),
), ),
); height: 55,
}, width: 55,
child: Container( child: Padding(
margin: EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
color: Colors.white,
child: Row(
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network( child: Image.network(
model model.prescriptionReportEnhList[index].imageSRCUrl,
.prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
width: 60,
height: 70,
), ),
), ),
SizedBox(
width: 10,
), ),
Expanded( SizedBox(width: 10,),
child: Padding( Expanded(child: Column(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: [
Texts(model.prescriptionReportEnhList[index] Row(
.itemDescription), children: [
Texts(TranslationBase.of(context).route,color: Colors.grey,),
Expanded(child: Texts(model.prescriptionReportEnhList[index].route??'')),
], ],
), ),
Row(
children: [
Texts(TranslationBase.of(context).frequency,color: Colors.grey,),
Texts(model.prescriptionReportEnhList[index].frequency ?? ''),
],
), ),
), SizedBox(height: 12,),
Icon( Texts(model.prescriptionReportEnhList[index].remarks?? ''),
Icons.arrow_forward_ios, ],
size: 18, ),)
color: Colors.grey[500],
],
) )
], ],
), ),
@ -217,6 +179,8 @@ class PrescriptionItemsPage extends StatelessWidget {
), ),
), ),
], ],
), ),
), ),

@ -1,8 +1,10 @@
import 'package:doctor_app_flutter/core/enum/filter_type.dart'; import 'package:doctor_app_flutter/core/enum/filter_type.dart';
import 'package:doctor_app_flutter/core/viewModel/prescription_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/prescriptions_view_model.dart';
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_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/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/prescription/add_prescription_form.dart';
import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart'; import 'package:doctor_app_flutter/screens/prescription/prescription_items_page.dart';
import 'package:doctor_app_flutter/util/date-utils.dart'; import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
@ -17,7 +19,6 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
class PrescriptionsPage extends StatelessWidget { class PrescriptionsPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;
@ -25,7 +26,7 @@ class PrescriptionsPage extends StatelessWidget {
String patientType = routeArgs['patientType']; String patientType = routeArgs['patientType'];
String arrivalType = routeArgs['arrivalType']; String arrivalType = routeArgs['arrivalType'];
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<PrescriptionsViewModel>( return BaseView<PrescriptionViewModel>(
onModelReady: (model) => model.getPrescriptions(patient), onModelReady: (model) => model.getPrescriptions(patient),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
baseViewModel: model, baseViewModel: model,
@ -35,22 +36,35 @@ class PrescriptionsPage extends StatelessWidget {
child: ListView( child: ListView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
children: <Widget>[ children: <Widget>[
PatientProfileHeaderNewDesign(patient,arrivalType??'0',patientType), PatientProfileHeaderNewDesign(
SizedBox(height: 12,), patient, arrivalType ?? '0', patientType),
SizedBox(
height: 12,
),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts('Order',style: "caption2",color: Colors.black,fontSize: 13,), Texts(
Texts('Prescriptions',bold: true,fontSize: 22,), 'Order',
style: "caption2",
color: Colors.black,
fontSize: 13,
),
Texts(
'Prescriptions',
bold: true,
fontSize: 22,
),
], ],
), ),
), ),
if(patientType!=null && patientType=='7') if (patientType != null && patientType == '7')
InkWell( InkWell(
onTap: (){ onTap: () {
//TODO Hussam call the add page here addPrescriptionForm(
context, model, patient, model.prescriptionList);
}, },
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
@ -73,39 +87,55 @@ class PrescriptionsPage extends StatelessWidget {
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: Center( child: Center(
child: Icon(Icons.add,color: Colors.white,), child: Icon(
Icons.add,
color: Colors.white,
),
),
), ),
SizedBox(
height: 10,
), ),
SizedBox(height: 10,), Texts(
Texts('Apply for New Prescriptions Order',color: Colors.grey[600],fontWeight: FontWeight.w600,) 'Apply for New Prescriptions Order',
color: Colors.grey[600],
fontWeight: FontWeight.w600,
)
], ],
), ),
), ),
), ),
), ),
), ),
...List.generate(model.prescriptionsList.length, (index) => InkWell( ...List.generate(
model.prescriptionsList.length,
(index) => InkWell(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: PrescriptionItemsPage( page: PrescriptionItemsPage(
prescriptions: model.prescriptionsList[index], prescriptions:
model.prescriptionsList[index],
patient: patient, patient: patient,
patientType: patientType,
arrivalType: arrivalType,
), ),
), ),
), ),
child: DoctorCard( child: DoctorCard(
doctorName: model.prescriptionsList[index].doctorName, doctorName:
profileUrl: model.prescriptionsList[index].doctorImageURL, model.prescriptionsList[index].doctorName,
profileUrl:
model.prescriptionsList[index].doctorImageURL,
branch: model.prescriptionsList[index].name, branch: model.prescriptionsList[index].name,
appointmentDate: DateUtils.getDateTimeFromServerFormat(model.prescriptionsList[index].appointmentDate,), clinic: model
orderNo: model.prescriptionsList[index].appointmentNo.toString(), .prescriptionsList[index].clinicDescription,
invoiceNO:model.prescriptionsList[index].appointmentNo.toString(), isPrescriptions: true,
appointmentDate:
) DateUtils.getDateTimeFromServerFormat(
model.prescriptionsList[index].appointmentDate,
)) ),
)))
], ],
), ),
), ),

@ -28,7 +28,7 @@ class _ProcedureScreenState extends State<ProcedureScreen> {
} }
TextEditingController procedureController = TextEditingController(); TextEditingController procedureController = TextEditingController();
//TODO Jammal
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments as Map; final routeArgs = ModalRoute.of(context).settings.arguments as Map;

@ -552,6 +552,8 @@ class TranslationBase {
String get next => localizedValues['next'][locale.languageCode]; String get next => localizedValues['next'][locale.languageCode];
String get previous => localizedValues['previous'][locale.languageCode];
String get emptyMessage => String get emptyMessage =>
localizedValues['empty-message'][locale.languageCode]; localizedValues['empty-message'][locale.languageCode];

@ -22,7 +22,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: 0, right: 5, bottom: 5, top: 5), left: 0, right: 5, bottom: 5,),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
), ),
@ -188,9 +188,7 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate.toString()?? ''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -314,8 +312,9 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate;
const start = "/Date("; const start = "/Date(";
if (str.isNotEmpty) {
const end = "+0300)"; const end = "+0300)";
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
@ -323,11 +322,12 @@ class PatientProfileHeaderNewDesign extends StatelessWidget {
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -26,7 +26,8 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
final String profileUrl; final String profileUrl;
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final bool isPrescriptions;
final String clinic;
PatientProfileHeaderWhitAppointment( PatientProfileHeaderWhitAppointment(
{this.patient, {this.patient,
this.patientType, this.patientType,
@ -36,7 +37,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
this.appointmentDate, this.appointmentDate,
this.profileUrl, this.profileUrl,
this.invoiceNO, this.invoiceNO,
this.orderNo}); this.orderNo, this.isPrescriptions = false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -209,9 +210,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
), ),
Container( Container(
child: AppText( child: AppText(
convertDateFormat2(patient convertDateFormat2(patient.appointmentDate??''),
.appointmentDate
.toString()),
fontSize: 1.5 * fontSize: 1.5 *
SizeConfig SizeConfig
.textMultiplier, .textMultiplier,
@ -371,7 +370,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -383,7 +382,7 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -395,10 +394,34 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
) )
], ],
), ),
if(isPrescriptions)
Row(
children: [
Texts(
'Branch:',
color: Colors.grey[800],
),
Texts(
branch?? '',
)
],
),
if(isPrescriptions)
Row(
children: [
Texts(
'Clinic:',
color: Colors.grey[800],
),
Texts(
clinic?? '',
)
],
),
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
'Result Date:', !isPrescriptions? 'Result Date:': 'Prescriptions Date',
color: Colors.grey[800], color: Colors.grey[800],
), ),
Expanded( Expanded(
@ -425,20 +448,22 @@ class PatientProfileHeaderWhitAppointment extends StatelessWidget {
} }
convertDateFormat2(String str) { convertDateFormat2(String str) {
String timeConvert; String newDate ="";
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; const end = "+0300)";
if (str.isNotEmpty) {
final startIndex = str.indexOf(start); final startIndex = str.indexOf(start);
final endIndex = str.indexOf(end, startIndex + start.length); final endIndex = str.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(
int.parse(str.substring(startIndex + start.length, endIndex))); int.parse(str.substring(startIndex + start.length, endIndex)));
String newDate = date.year.toString() + newDate = date.year.toString() +
"/" + "/" +
date.month.toString().padLeft(2, '0') + date.month.toString().padLeft(2, '0') +
"/" + "/" +
date.day.toString().padLeft(2, '0'); date.day.toString().padLeft(2, '0');
}
return newDate.toString(); return newDate.toString();
} }

@ -217,6 +217,7 @@ class _TextsState extends State<Texts> {
letterSpacing: letterSpacing:
widget.variant == "overline" ? 1.5 : null, widget.variant == "overline" ? 1.5 : null,
fontWeight: widget.fontWeight ?? _getFontWeight(), fontWeight: widget.fontWeight ?? _getFontWeight(),
fontFamily: 'Poppins',
decoration: decoration:
widget.textDecoration //TextDecoration.lineThrough widget.textDecoration //TextDecoration.lineThrough
)), )),
@ -251,7 +252,7 @@ class _TextsState extends State<Texts> {
style: _getFontStyle().copyWith( style: _getFontStyle().copyWith(
color: HexColor('#FF0000'), color: HexColor('#FF0000'),
fontWeight: FontWeight.w800, fontWeight: FontWeight.w800,
fontFamily: "WorkSans", fontFamily: "Poppins",
)), )),
), ),
), ),

@ -1,6 +1,6 @@
import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'app_texts_widget.dart'; import 'app_texts_widget.dart';
class AppTextFieldCustom extends StatefulWidget { class AppTextFieldCustom extends StatefulWidget {
@ -9,17 +9,30 @@ class AppTextFieldCustom extends StatefulWidget {
final String hintText; final String hintText;
final TextEditingController controller; final TextEditingController controller;
final bool isDropDown; final bool isDropDown;
final String dropDownText;
final Icon suffixIcon; final Icon suffixIcon;
final Color dropDownColor; final Color dropDownColor;
final bool enabled;
final TextInputType inputType;
final int minLines;
final int maxLines;
final List<TextInputFormatter> inputFormatters;
AppTextFieldCustom( AppTextFieldCustom({
{this.height = 0, this.height = 0,
this.onClick, this.onClick,
this.hintText, this.hintText,
this.controller, this.controller,
this.isDropDown = false, this.isDropDown = false,
this.dropDownText,
this.suffixIcon, this.suffixIcon,
this.dropDownColor}); this.dropDownColor,
this.enabled = true,
this.inputType = TextInputType.text,
this.minLines = 1,
this.maxLines = 1,
this.inputFormatters,
});
@override @override
_AppTextFieldCustomState createState() => _AppTextFieldCustomState(); _AppTextFieldCustomState createState() => _AppTextFieldCustomState();
@ -43,22 +56,37 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if (widget.controller.text != "") if ((widget.controller != null &&
widget.controller.text != "") ||
widget.dropDownText != null)
AppText( AppText(
widget.hintText, widget.hintText,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: SizeConfig.textMultiplier * 1.4, fontSize: SizeConfig.textMultiplier * 1.4,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
TextField( widget.dropDownText == null
? TextField(
textAlign: TextAlign.left, textAlign: TextAlign.left,
decoration: textFieldSelectorDecoration( decoration: textFieldSelectorDecoration(
widget.hintText, null, true), widget.hintText, null, true),
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: SizeConfig.textMultiplier * 1.7,
color: Colors.grey.shade600, fontFamily: 'Poppins',
color: Colors.grey.shade800,
), ),
controller: widget.controller, controller: widget.controller,
keyboardType: widget.inputType,
enabled: widget.enabled,
minLines: widget.minLines,
maxLines: widget.maxLines,
inputFormatters: widget.inputFormatters != null ? widget.inputFormatters : [],
)
: AppText(
widget.dropDownText,
fontFamily: 'Poppins',
color: Colors.grey.shade800,
fontSize: SizeConfig.textMultiplier * 1.7,
), ),
], ],
), ),
@ -67,7 +95,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
? widget.suffixIcon != null ? widget.suffixIcon != null
? widget.suffixIcon ? widget.suffixIcon
: Icon( : Icon(
Icons.arrow_drop_down, Icons.keyboard_arrow_down,
color: widget.dropDownColor != null color: widget.dropDownColor != null
? widget.dropDownColor ? widget.dropDownColor
: Colors.black, : Colors.black,
@ -85,7 +113,7 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
return BoxDecoration( return BoxDecoration(
color: containerColor, color: containerColor,
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)), borderRadius: BorderRadius.all(Radius.circular(12)),
border: Border.fromBorderSide(BorderSide( border: Border.fromBorderSide(BorderSide(
color: borderColor, color: borderColor,
width: borderWidth == -1 ? 2.0 : borderWidth, width: borderWidth == -1 ? 2.0 : borderWidth,
@ -102,6 +130,9 @@ class _AppTextFieldCustomState extends State<AppTextFieldCustom> {
enabledBorder: UnderlineInputBorder( enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)), borderSide: BorderSide(color: Color(0Xffffffff)),
), ),
disabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)),
),
focusedBorder: UnderlineInputBorder( focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Color(0Xffffffff)), borderSide: BorderSide(color: Color(0Xffffffff)),
), ),

@ -138,7 +138,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
color: Colors.white, color: Colors.white,
fontSize: 17.0, fontSize: 17.0,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: "WorkSans")), fontFamily: "Poppins")),
) )
], ],
), ),

@ -25,7 +25,7 @@ class AppText extends StatefulWidget {
{this.color = Colors.black, {this.color = Colors.black,
this.fontWeight = FontWeight.normal, this.fontWeight = FontWeight.normal,
this.fontSize, this.fontSize,
this.fontFamily = 'WorkSans', this.fontFamily = 'Poppins',
this.margin, this.margin,
this.marginTop = 0, this.marginTop = 0,
this.marginRight = 0, this.marginRight = 0,

@ -19,6 +19,8 @@ class DoctorCard extends StatelessWidget {
final String invoiceNO; final String invoiceNO;
final String orderNo; final String orderNo;
final Function onTap; final Function onTap;
final bool isPrescriptions;
final String clinic;
DoctorCard( DoctorCard(
{this.doctorName, {this.doctorName,
@ -27,7 +29,7 @@ class DoctorCard extends StatelessWidget {
this.invoiceNO, this.invoiceNO,
this.onTap, this.onTap,
this.appointmentDate, this.appointmentDate,
this.orderNo}); this.orderNo, this.isPrescriptions=false, this.clinic});
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -67,6 +69,7 @@ class DoctorCard extends StatelessWidget {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
fontSize: 14, fontSize: 14,
), ),
if(!isPrescriptions)
Texts( Texts(
'${DateUtils.getHour(appointmentDate)}', '${DateUtils.getHour(appointmentDate)}',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -96,7 +99,7 @@ class DoctorCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (orderNo != null) if (orderNo != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -108,7 +111,7 @@ class DoctorCard extends StatelessWidget {
) )
], ],
), ),
if (invoiceNO != null) if (invoiceNO != null && !isPrescriptions)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -120,6 +123,19 @@ class DoctorCard extends StatelessWidget {
) )
], ],
), ),
if(isPrescriptions)
Row(
children: <Widget>[
Texts(
'Clinic:',
color: Colors.grey[500],
),
Texts(
clinic,
)
],
),
if(branch!=null)
Row( Row(
children: <Widget>[ children: <Widget>[
Texts( Texts(
@ -135,7 +151,7 @@ class DoctorCard extends StatelessWidget {
), ),
), ),
Icon( Icon(
EvaIcons.eye, isPrescriptions? Icons.arrow_forward: EvaIcons.eye,
) )
], ],
), ),

@ -608,7 +608,7 @@ packages:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0-nullsafety.3" version: "1.3.0-nullsafety.4"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@ -900,7 +900,7 @@ packages:
name: stack_trace name: stack_trace
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0-nullsafety.1" version: "1.10.0-nullsafety.2"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
@ -1084,5 +1084,5 @@ packages:
source: hosted source: hosted
version: "2.2.1" version: "2.2.1"
sdks: sdks:
dart: ">=2.10.0 <2.11.0" dart: ">=2.10.0 <=2.11.0-213.1.beta"
flutter: ">=1.22.0 <2.0.0" flutter: ">=1.22.0 <2.0.0"

@ -121,19 +121,19 @@ flutter:
# list giving the asset and other descriptors for the font. For # list giving the asset and other descriptors for the font. For
# example: # example:
fonts: fonts:
- family: WorkSans
fonts:
- asset: assets/fonts/Work_Sans/WorkSans-Regular.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
- asset: assets/fonts/Work_Sans/WorkSans-Bold.ttf
weight: 700
- family: Poppins - family: Poppins
fonts: fonts:
- asset: assets/fonts/Poppins/Poppins-Regular.ttf - asset: assets/fonts/Poppins/Poppins-Regular.ttf
weight: 400
- asset: assets/fonts/Poppins/Poppins-Medium.ttf - asset: assets/fonts/Poppins/Poppins-Medium.ttf
weight: 500
- asset: assets/fonts/Poppins/Poppins-Bold.ttf - asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 700 weight: 700
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 800
- asset: assets/fonts/Poppins/Poppins-Bold.ttf
weight: 900
# - family: Trajan Pro # - family: Trajan Pro

Loading…
Cancel
Save