diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 878a1850..2f4607e0 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -322,4 +322,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69 -COCOAPODS: 1.10.1 +COCOAPODS: 1.10.0.rc.1 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 21dae61a..19c05230 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -843,4 +843,11 @@ const Map> localizedValues = { "en": "Step", "ar": "خطوة" }, + "applyOrRescheduleLeave": { + "en": "Apply Or Reschedule Leave", + "ar": "التقدم بطلب أو إعادة جدولة الإجازة" + },"myQRCode": { + "en": "My QR Code", + "ar": "My QR Code" + }, }; diff --git a/lib/screens/auth/login_screen.dart b/lib/screens/auth/login_screen.dart index 957dcc66..465ef71e 100644 --- a/lib/screens/auth/login_screen.dart +++ b/lib/screens/auth/login_screen.dart @@ -119,7 +119,7 @@ class _LoginsreenState extends State { children: [ AuthHeader(loginType.knownUser), SizedBox( - height: 60, + height: 40, ), LoginForm( changeLoadingStata: changeLoadingStata, diff --git a/lib/screens/patients/profile/patient_profile_screen.dart b/lib/screens/patients/profile/patient_profile_screen.dart index 70c9f5b9..63a1247b 100644 --- a/lib/screens/patients/profile/patient_profile_screen.dart +++ b/lib/screens/patients/profile/patient_profile_screen.dart @@ -141,24 +141,29 @@ class PatientProfileScreen extends StatelessWidget { if (patient.episodeNo != 0) BorderedButton( "${TranslationBase.of(context).update}\n${TranslationBase.of(context).episode}", - backgroundColor: Colors.red.shade700, - textColor: Colors.white, - vPadding: 8, - radius: 30, - hPadding: 20, - fontWeight: FontWeight.normal, - fontSize: 12, - fontFamily: 'Poppins', - icon: Image.asset( - "assets/images/modilfy-episode.png", - color: Colors.white, - height: 30, + backgroundColor: + patient.patientStatusType == 43 + ? Colors.red.shade700 + : Colors.grey.shade700, + textColor: Colors.white, + vPadding: 8, + radius: 30, + hPadding: 20, + fontWeight: FontWeight.normal, + fontSize: 12, + fontFamily: 'Poppins', + icon: Image.asset( + "assets/images/modilfy-episode.png", + color: Colors.white, + height: 30, ), handler: () { - Navigator.of(context).pushNamed( - UPDATE_EPISODE, - arguments: {'patient': patient}); - }, + if (patient.patientStatusType == 43) { + Navigator.of(context).pushNamed( + UPDATE_EPISODE, + arguments: {'patient': patient}); + } + } ), ], ), diff --git a/lib/screens/prescription/add_prescription_form.dart b/lib/screens/prescription/add_prescription_form.dart index 1330dae4..f6207b52 100644 --- a/lib/screens/prescription/add_prescription_form.dart +++ b/lib/screens/prescription/add_prescription_form.dart @@ -345,8 +345,9 @@ class _PrescriptionFormWidgetState extends State { suggestion .genericName), padding: - EdgeInsets.all(8.0)), + EdgeInsets.all(15.0)), itemSorter: (a, b) => 1, + suggestionsAmount: 7, itemFilter: (suggestion, input) => suggestion.genericName.toLowerCase().startsWith( input.toLowerCase()) || @@ -383,710 +384,844 @@ class _PrescriptionFormWidgetState extends State { SizedBox( height: spaceBetweenTextFileds, ), - Container( - child: Row( - children: [ - AppText( - 'Order Type', - fontWeight: FontWeight.w600, - ), - Radio( - activeColor: Color(0xFFB9382C), - value: 1, - groupValue: selectedType, - onChanged: (value) { - setSelectedType(value); - }, - ), - Text('Regular'), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - width: double.infinity, - child: Row( - children: [ - Container( - width: MediaQuery.of(context) - .size - .width * - 0.550, - child: TextFields( - inputFormatters: [ - LengthLimitingTextInputFormatter( - 5), - // WhitelistingTextInputFormatter - // .digitsOnly - ], - hintText: - TranslationBase.of(context) - .strength, - controller: strengthController, - keyboardType: - TextInputType.numberWithOptions( - decimal: true, + Visibility( + visible: _selectedMedication == null + ? false + : true, + child: Container( + child: Column( + children: [ + Container( + child: Row( + children: [ + AppText( + 'Order Type', + fontWeight: FontWeight.w600, + ), + Radio( + activeColor: + Color(0xFFB9382C), + value: 1, + groupValue: selectedType, + onChanged: (value) { + setSelectedType(value); + }, + ), + Text('Regular'), + ], ), - onChanged: (String value) { - setState(() { - strengthChar = value.length; - }); - if (strengthChar >= 5) { - DrAppToastMsg.showErrorToast( - "Only 5 Digits allowed for strength"); - } - }, - onSubmit: (_) { - if (_selectedMedication != null && - duration != null && - frequency != null && - strengthController.text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); - box = model.boxQuintity; + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + width: double.infinity, + child: Row( + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.550, + child: TextFields( + inputFormatters: [ + LengthLimitingTextInputFormatter( + 5), + // WhitelistingTextInputFormatter + // .digitsOnly + ], + hintText: + TranslationBase.of( + context) + .strength, + controller: + strengthController, + keyboardType: TextInputType + .numberWithOptions( + decimal: true, + ), + onChanged: (String value) { + setState(() { + strengthChar = + value.length; + }); + if (strengthChar >= 5) { + DrAppToastMsg + .showErrorToast( + "Only 5 Digits allowed for strength"); + } + }, + onSubmit: (_) { + if (_selectedMedication != + null && + duration != null && + frequency != null && + strengthController + .text != + null) { + model.getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration['id'], + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text)); + box = model.boxQuintity; - return; - } - }, - // validator: (value) { - // if (value.isEmpty && - // strengthController.text.length > - // 4) - // return TranslationBase.of(context) - // .emptyMessage; - // else - // return null; - // }, + return; + } + }, + // validator: (value) { + // if (value.isEmpty && + // strengthController.text.length > + // 4) + // return TranslationBase.of(context) + // .emptyMessage; + // else + // return null; + // }, + ), + ), + SizedBox( + width: 10.0, + ), + Container( + color: Colors.white, + width: MediaQuery.of(context) + .size + .width * + 0.350, + child: InkWell( + onTap: + model.itemMedicineListUnit != + null + ? () { + Helpers + .hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineListUnit, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState( + () { + units = + selectedValue; + units['isDefault'] = + true; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: + context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + 'UNIT', + units != null + ? units[ + 'description'] + : null, + true), + enabled: false), + ), + ), + ], + ), ), - ), - SizedBox( - width: 10.0, - ), - Container( - color: Colors.white, - width: MediaQuery.of(context) - .size - .width * - 0.350, - child: InkWell( - onTap: model.itemMedicineListUnit != - null - ? () { - Helpers.hideKeyboard( - context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .itemMedicineListUnit, - attributeName: - 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of( - context) - .ok, - okFunction: - (selectedValue) { - setState(() { - units = selectedValue; - units['isDefault'] = - true; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: (BuildContext - context) { - return dialog; - }, - ); - } - : null, - child: TextField( + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.itemMedicineListRoute != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineListRoute, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + route = + selectedValue; + route['isDefault'] = + true; + }); + if (route == + null) { + helpers.showErrorToast( + 'plase fill'); + } + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( decoration: textFieldSelectorDecoration( - 'UNIT', - units != null - ? units[ + TranslationBase.of( + context) + .route, + route != null + ? route[ 'description'] : null, true), - enabled: false), + enabled: false, + ), + ), ), - ), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.itemMedicineListRoute != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: - model.itemMedicineListRoute, - attributeName: 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - route = selectedValue; - route['isDefault'] = true; - }); - if (route == null) { - helpers.showErrorToast( - 'plase fill'); - } - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).route, - route != null - ? route['description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.itemMedicineList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.itemMedicineList, - attributeName: 'description', - attributeValueId: - 'parameterCode', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - frequency = selectedValue; - frequency['isDefault'] = - true; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController - .text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text)); + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.itemMedicineList != null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .itemMedicineList, + attributeName: + 'description', + attributeValueId: + 'parameterCode', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + frequency = + selectedValue; + frequency[ + 'isDefault'] = + true; + if (_selectedMedication != null && + duration != + null && + frequency != + null && + strengthController + .text != + null) { + model.getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration[ + 'id'], + itemCode: + _selectedMedication + .itemId, + strength: + double.parse( + strengthController.text)); - return; - } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .frequency, - frequency != null - ? frequency['description'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.medicationDoseTimeList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDoseTimeList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - doseTime = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .doseTime, - doseTime != null - ? doseTime['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - if (model.patientAssessmentList.isNotEmpty) - Container( - height: screenSize.height * 0.070, - width: double.infinity, - color: Colors.white, - child: Row( - children: [ + return; + } + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .frequency, + frequency != null + ? frequency[ + 'description'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), Container( - width: MediaQuery.of(context) - .size - .width * - 0.29, + height: screenSize.height * 0.070, + color: Colors.white, child: InkWell( - onTap: indicationList != null + onTap: + model.medicationDoseTimeList != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .medicationDoseTimeList, + attributeName: + 'nameEn', + attributeValueId: + 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + doseTime = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .doseTime, + doseTime != null + ? doseTime['nameEn'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + if (model + .patientAssessmentList.isNotEmpty) + Container( + height: screenSize.height * 0.070, + width: double.infinity, + color: Colors.white, + child: Row( + children: [ + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.29, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString(), + indication != + null + ? indication[ + 'name'] + : null, + false), + enabled: true, + readOnly: true, + ), + ), + ), + Container( + width: + MediaQuery.of(context) + .size + .width * + 0.65, + color: Colors.white, + child: InkWell( + onTap: + indicationList != null + ? () { + Helpers.hideKeyboard( + context); + } + : null, + child: TextField( + maxLines: 5, + decoration: + textFieldSelectorDecoration( + model + .patientAssessmentList[ + 0] + .asciiDesc + .toString(), + indication != + null + ? indication[ + 'name'] + : null, + false), + enabled: true, + readOnly: true, + ), + ), + ), + ], + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: () => selectDate( + context, widget.model), + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .date, + selectedDate != null + ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" + : null, + true, + suffixIcon: Icon( + Icons.calendar_today, + color: Colors.black, + )), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: + model.medicationDurationList != + null + ? () { + Helpers.hideKeyboard( + context); + ListSelectDialog + dialog = + ListSelectDialog( + list: model + .medicationDurationList, + attributeName: + 'nameEn', + attributeValueId: + 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + if (_selectedMedication != null && + duration != + null && + frequency != + null && + strengthController + .text != + null) { + model + .getBoxQuantity( + freq: frequency[ + 'parameterCode'], + duration: + duration[ + 'id'], + itemCode: + _selectedMedication + .itemId, + strength: double.parse( + strengthController + .text), + ); + box = model + .boxQuintity; + + return; + } + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: + (BuildContext + context) { + return dialog; + }, + ); + } + : null, + child: TextField( + decoration: + textFieldSelectorDecoration( + TranslationBase.of( + context) + .duration, + duration != null + ? duration['nameEn'] + : null, + true), + enabled: false, + ), + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + height: screenSize.height * 0.070, + color: Colors.white, + child: InkWell( + onTap: model.allMedicationList != + null ? () { Helpers.hideKeyboard( context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .allMedicationList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); } : null, child: TextField( decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString(), - indication != null - ? indication['name'] + "UOM", + uom != null + ? uom : null, false), - enabled: true, + //enabled: false, readOnly: true, ), ), ), + SizedBox( + height: spaceBetweenTextFileds), Container( - width: MediaQuery.of(context) - .size - .width * - 0.65, + height: screenSize.height * 0.070, color: Colors.white, child: InkWell( - onTap: indicationList != null + onTap: model.allMedicationList != + null ? () { Helpers.hideKeyboard( context); + ListSelectDialog dialog = + ListSelectDialog( + list: model + .allMedicationList, + attributeName: 'nameEn', + attributeValueId: 'id', + okText: + TranslationBase.of( + context) + .ok, + okFunction: + (selectedValue) { + setState(() { + duration = + selectedValue; + }); + }, + ); + showDialog( + barrierDismissible: + false, + context: context, + builder: (BuildContext + context) { + return dialog; + }, + ); } : null, child: TextField( - maxLines: 5, decoration: textFieldSelectorDecoration( - model - .patientAssessmentList[ - 0] - .asciiDesc - .toString(), - indication != null - ? indication['name'] + "Box Quantity", + box != null + ? "Box Quantity: " + + model + .boxQuintity + .toString() : null, false), - enabled: true, + //enabled: false, readOnly: true, ), ), ), - ], - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: () => - selectDate(context, widget.model), - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context).date, - selectedDate != null - ? "${DateUtils.convertStringToDateFormat(selectedDate.toString(), "yyyy-MM-dd")}" - : null, - true, - suffixIcon: Icon( - Icons.calendar_today, - color: Colors.black, - )), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.medicationDurationList != - null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model - .medicationDurationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - if (_selectedMedication != - null && - duration != null && - frequency != null && - strengthController - .text != - null) { - model.getBoxQuantity( - freq: frequency[ - 'parameterCode'], - duration: - duration['id'], - itemCode: - _selectedMedication - .itemId, - strength: double.parse( - strengthController - .text), - ); - box = model.boxQuintity; - + SizedBox( + height: spaceBetweenTextFileds), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: + HexColor("#CCCCCC"))), + child: TextFields( + maxLines: 6, + minLines: 4, + hintText: + TranslationBase.of(context) + .instruction, + controller: instructionController, + //keyboardType: TextInputType.number, + ), + ), + SizedBox( + height: spaceBetweenTextFileds), + Container( + margin: EdgeInsets.all( + SizeConfig.widthMultiplier * 5), + child: Wrap( + alignment: WrapAlignment.center, + children: [ + AppButton( + color: Color(0xff359846), + title: TranslationBase.of( + context) + .addMedication, + fontWeight: FontWeight.w600, + onPressed: () { + // formKey.currentState.save(); + // Navigator.pop(context); + // openDrugToDrug(); + if (route == null || + frequency == null || + doseTime == null || + duration == null || + selectedDate == null || + units == null) { + DrAppToastMsg.showErrorToast( + "Please Fill All Fields"); + return; + } + if (_selectedMedication + .isNarcotic == + true) { + DrAppToastMsg.showErrorToast( + "Narcotic medicine can only be prescribed from VIDA"); + Navigator.pop(context); return; } - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - TranslationBase.of(context) - .duration, - duration != null - ? duration['nameEn'] - : null, - true), - enabled: false, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - "UOM", - uom != null ? uom : null, - false), - //enabled: false, - readOnly: true, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - height: screenSize.height * 0.070, - color: Colors.white, - child: InkWell( - onTap: model.allMedicationList != null - ? () { - Helpers.hideKeyboard(context); - ListSelectDialog dialog = - ListSelectDialog( - list: model.allMedicationList, - attributeName: 'nameEn', - attributeValueId: 'id', - okText: - TranslationBase.of(context) - .ok, - okFunction: (selectedValue) { - setState(() { - duration = selectedValue; - }); - }, - ); - showDialog( - barrierDismissible: false, - context: context, - builder: - (BuildContext context) { - return dialog; - }, - ); - } - : null, - child: TextField( - decoration: textFieldSelectorDecoration( - "Box Quantity", - box != null - ? "Box Quantity: " + - model.boxQuintity.toString() - : null, - false), - //enabled: false, - readOnly: true, - ), - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), - child: TextFields( - maxLines: 6, - minLines: 4, - hintText: TranslationBase.of(context) - .instruction, - controller: instructionController, - //keyboardType: TextInputType.number, - ), - ), - SizedBox(height: spaceBetweenTextFileds), - Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), - child: Wrap( - alignment: WrapAlignment.center, - children: [ - AppButton( - color: Color(0xff359846), - title: TranslationBase.of(context) - .addMedication, - fontWeight: FontWeight.w600, - onPressed: () { - // formKey.currentState.save(); - // Navigator.pop(context); - // openDrugToDrug(); - if (route == null || - frequency == null || - doseTime == null || - duration == null || - selectedDate == null || - units == null) { - DrAppToastMsg.showErrorToast( - "Please Fill All Fields"); - return; - } - if (_selectedMedication - .isNarcotic == - true) { - DrAppToastMsg.showErrorToast( - "Narcotic medicine can only be prescribed from VIDA"); - Navigator.pop(context); - return; - } - if (double.parse( - strengthController.text) > - 1000.0) { - DrAppToastMsg.showErrorToast( - "1000 is the MAX for the strength"); - return; - } - if (double.parse( - strengthController.text) < - 0.0) { - DrAppToastMsg.showErrorToast( - "strength can't be zero"); - return; - } + if (double.parse( + strengthController + .text) > + 1000.0) { + DrAppToastMsg.showErrorToast( + "1000 is the MAX for the strength"); + return; + } + if (double.parse( + strengthController + .text) < + 0.0) { + DrAppToastMsg.showErrorToast( + "strength can't be zero"); + return; + } - if (formKey.currentState - .validate()) { - Navigator.pop(context); - openDrugToDrug(model); - { - /*// var x = model - // .patientAssessmentList - // .map((value) => - // value.icdCode10ID) - // .toList() - // .join(','); - - postProcedure( - icdCode: model - .patientAssessmentList - .isNotEmpty - ? model - .patientAssessmentList[ - 0] - .icdCode10ID - .isEmpty - ? "test" - : model - .patientAssessmentList[ - 0] - .icdCode10ID - .toString() - : "TEST", - // icdCode: model + if (formKey.currentState + .validate()) { + Navigator.pop(context); + openDrugToDrug(model); + { + /*// var x = model // .patientAssessmentList - // .map((value) => value - // .icdCode10ID - // .trim()) + // .map((value) => + // value.icdCode10ID) // .toList() - // .join(' '), - dose: strengthController.text, - doseUnit: - units['parameterCode'] - .toString(), - patient: widget.patient, - doseTimeIn: - doseTime['id'].toString(), - model: widget.model, - duration: - duration['id'].toString(), - frequency: - frequency['parameterCode'] - .toString(), - route: route['parameterCode'] - .toString(), - drugId: _selectedMedication - .itemId - .toString(), - strength: - strengthController.text, - indication: - indicationController.text, - instruction: - instructionController - .text, - doseTime: selectedDate, - ); - */ - } - } + // .join(','); - { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => - // NewPrescriptionScreen()), - // ); - } - }, - ), - ], + postProcedure( + icdCode: model + .patientAssessmentList + .isNotEmpty + ? model + .patientAssessmentList[ + 0] + .icdCode10ID + .isEmpty + ? "test" + : model + .patientAssessmentList[ + 0] + .icdCode10ID + .toString() + : "TEST", + // icdCode: model + // .patientAssessmentList + // .map((value) => value + // .icdCode10ID + // .trim()) + // .toList() + // .join(' '), + dose: strengthController.text, + doseUnit: + units['parameterCode'] + .toString(), + patient: widget.patient, + doseTimeIn: + doseTime['id'].toString(), + model: widget.model, + duration: + duration['id'].toString(), + frequency: + frequency['parameterCode'] + .toString(), + route: route['parameterCode'] + .toString(), + drugId: _selectedMedication + .itemId + .toString(), + strength: + strengthController.text, + indication: + indicationController.text, + instruction: + instructionController + .text, + doseTime: selectedDate, + ); + */ + } + } + + { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => + // NewPrescriptionScreen()), + // ); + } + }, + ), + ], + ), + ), + ], + ), ), ), ], diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 3426e4cd..4846c8c9 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -133,47 +133,56 @@ class _EntityListCheckboxSearchWidgetState child: Row( children: [ AppText( - TranslationBase.of(context) - .orderType), - Radio( - activeColor: Color(0xFFB9382C), - value: 0, - groupValue: selectedType, - onChanged: (value) { - historyInfo.type = - setSelectedType(value) - .toString(); - - historyInfo.type = - value.toString(); - }, + TranslationBase.of(context) + .orderType, + fontWeight: FontWeight.w700, ), - Text('routine'), - Radio( - activeColor: Color(0xFFB9382C), - groupValue: selectedType, - value: 1, - onChanged: (value) { - historyInfo.type = - setSelectedType(value) - .toString(); + Row( + children: [ + Radio( + activeColor: + Color(0xFFB9382C), + value: 0, + groupValue: selectedType, + onChanged: (value) { + historyInfo.type = + setSelectedType(value) + .toString(); + + historyInfo.type = + value.toString(); + }, + ), + Text('routine'), + Radio( + activeColor: + Color(0xFFB9382C), + groupValue: selectedType, + value: 1, + onChanged: (value) { + historyInfo.type = + setSelectedType(value) + .toString(); - historyInfo.type = - value.toString(); - }, + historyInfo.type = + value.toString(); + }, + ), + Text(TranslationBase.of( + context) + .urgent), + ], ), - Text(TranslationBase.of(context) - .urgent), ], ), ), ), SizedBox( - height: 15.0, + height: 2.0, ), Padding( padding: EdgeInsets.symmetric( - horizontal: 12), + horizontal: 12, vertical: 12.0), child: TextFields( hintText: TranslationBase.of(context) .remarks, diff --git a/lib/util/translations_delegate_base.dart b/lib/util/translations_delegate_base.dart index 6094331f..265c7280 100644 --- a/lib/util/translations_delegate_base.dart +++ b/lib/util/translations_delegate_base.dart @@ -622,6 +622,11 @@ class TranslationBase { String get rescheduleLeaves => localizedValues['reschedule-leave'][locale.languageCode]; + String get applyOrRescheduleLeave => + localizedValues['applyOrRescheduleLeave'][locale.languageCode]; + String get myQRCode => + localizedValues['myQRCode'][locale.languageCode]; + String get addMedication => localizedValues['addMedication'][locale.languageCode]; diff --git a/lib/widgets/auth/known_user_login.dart b/lib/widgets/auth/known_user_login.dart index b181aed8..cbf3c71a 100644 --- a/lib/widgets/auth/known_user_login.dart +++ b/lib/widgets/auth/known_user_login.dart @@ -319,7 +319,7 @@ class _KnownUserLoginState extends State { } navigateToHome() { - Navigator.of(context).pushNamed(HOME); + Navigator.of(context).pushReplacementNamed(HOME); } showErorrMsg(localMsg) { diff --git a/lib/widgets/auth/login_form.dart b/lib/widgets/auth/login_form.dart index c59c01d9..487f6be9 100644 --- a/lib/widgets/auth/login_form.dart +++ b/lib/widgets/auth/login_form.dart @@ -69,220 +69,232 @@ class _LoginFormState extends State { return Form( key: loginFormKey, - child: Container( - width: SizeConfig.realScreenWidth * 0.90, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - buildSizedBox(), - Padding( - child: AppText( - TranslationBase.of(context).enterCredentials, - fontSize: 18, - fontWeight: FontWeight.w600, - ), - padding: EdgeInsets.only(top: 10, bottom: 10)), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"), - ), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 10, top: 10), - child: AppText( - TranslationBase.of(context).enterId, - fontWeight: FontWeight.w600, - )), - AppTextFormField( - labelText: '', - borderColor: Colors.white, - // keyboardType: TextInputType.number, - textInputAction: TextInputAction.next, - // decoration: buildInputDecoration( - // context, - // TranslationBase.of(context).enterId, - // 'assets/images/user_id_icon.png'), - validator: (value) { - if (value != null && value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterYourID; - } - return null; - }, - onSaved: (value) { - if (value != null) userInfo.userID = value.trim(); - }, - onChanged: (value) { - if (value != null) userInfo.userID = value.trim(); - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - }, - // onEditingComplete: () {}, - // autofocus: false, - ) - ])), - buildSizedBox(), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"), - ), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 10, top: 10), - child: AppText( - TranslationBase.of(context).enterPassword, - fontWeight: FontWeight.w600, - )), - AppTextFormField( - focusNode: focusPass, - obscureText: true, - borderColor: Colors.white, - textInputAction: TextInputAction.next, - // decoration: buildInputDecoration( - // context, - // TranslationBase.of(context).enterPassword, - // 'assets/images/password_icon.png'), - validator: (value) { - if (value != null && value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterPassword; - } - return null; - }, - onSaved: (value) { - userInfo.password = value; - }, - onFieldSubmitted: (_) { - focusPass.nextFocus(); - helpers.showCupertinoPicker(context, projectsList, - 'facilityName', onSelectProject); - }, - onTap: () { - this.getProjects(userInfo.userID); - }, - ) - ])), - buildSizedBox(), - projectsList.length > 0 - ? Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"), - ), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 10, top: 10), - child: AppText( - TranslationBase.of(context).selectYourProject, - fontWeight: FontWeight.w600, - )), - AppTextFormField( - focusNode: focusProject, - controller: projectIdController, - borderColor: Colors.white, - onTap: () { - helpers.showCupertinoPicker( - context, - projectsList, - 'facilityName', - onSelectProject); - }, - // showCursor: false, - // //readOnly: true, - // decoration: buildInputDecoration( - // context, - // TranslationBase.of(context).selectYourProject, - // 'assets/images/password_icon.png'), - validator: (value) { - if (value != null && value.isEmpty) { - return TranslationBase.of(context) - .pleaseEnterYourProject; - } - return null; - }) - ])) - : Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"), - ), - color: Colors.white), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only(left: 10, top: 10), - child: AppText( - TranslationBase.of(context).selectYourProject, - fontWeight: FontWeight.w600, - )), - AppTextFormField( - readOnly: true, borderColor: Colors.white + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Container( + width: SizeConfig.realScreenWidth * 0.90, + height: SizeConfig.realScreenHeight * 0.65, + child: + Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + buildSizedBox(), + Padding( + child: AppText( + TranslationBase.of(context).enterCredentials, + fontSize: 18, + fontWeight: FontWeight.bold, + ), + padding: EdgeInsets.only(top: 10, bottom: 10)), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterId, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + labelText: '', + borderColor: Colors.white, + // keyboardType: TextInputType.number, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterId, + // 'assets/images/user_id_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourID; + } + return null; + }, + onSaved: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onChanged: (value) { + if (value != null) userInfo.userID = value.trim(); + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + }, + // onEditingComplete: () {}, + // autofocus: false, + ) + ])), + buildSizedBox(), + Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).enterPassword, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + focusNode: focusPass, + obscureText: true, + borderColor: Colors.white, + textInputAction: TextInputAction.next, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).enterPassword, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterPassword; + } + return null; + }, + onSaved: (value) { + userInfo.password = value; + }, + onFieldSubmitted: (_) { + focusPass.nextFocus(); + helpers.showCupertinoPicker(context, projectsList, + 'facilityName', onSelectProject); + }, + onTap: () { + this.getProjects(userInfo.userID); + }, + ) + ])), + buildSizedBox(), + projectsList.length > 0 + ? Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w600, + )), + AppTextFormField( + focusNode: focusProject, + controller: projectIdController, + borderColor: Colors.white, + suffixIcon: Icons.arrow_drop_down, + onTap: () { + helpers.showCupertinoPicker( + context, + projectsList, + 'facilityName', + onSelectProject); + }, + // showCursor: false, + // //readOnly: true, + // decoration: buildInputDecoration( + // context, + // TranslationBase.of(context).selectYourProject, + // 'assets/images/password_icon.png'), + validator: (value) { + if (value != null && value.isEmpty) { + return TranslationBase.of(context) + .pleaseEnterYourProject; + } + return null; + }) + ])) + : Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.only(left: 10, top: 10), + child: AppText( + TranslationBase.of(context).selectYourProject, + fontWeight: FontWeight.w800, + fontSize: 14, + )), + AppTextFormField( + readOnly: true, borderColor: Colors.white, + prefix: IconButton( + icon: Icon(Icons.arrow_drop_down), + iconSize: 30, + padding: EdgeInsets.only(bottom: 30), + ), + // decoration: buildInputDecoration( // context, // TranslationBase.of(context) // .pleaseEnterYourProject, // 'assets/images/password_icon.png') - - ) - ])), - buildSizedBox(), - - Row( - children: [ - Expanded( - child: Button( - title: TranslationBase.of(context).login, - color: Colors.red[700], - onTap: () { - login(context, authProv, widget.changeLoadingStata); - }, - )), - ], - ) - // Row( - // mainAxisAlignment: MainAxisAlignment.end, - // children: [ - // RaisedButton( - // onPressed: () { - // login(context, authProv, widget.changeLoadingStata); - // }, - // textColor: Colors.white, - // elevation: 0.0, - // padding: const EdgeInsets.all(0.0), - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(10), - // side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), - // child: Container( - // padding: const EdgeInsets.all(10.0), - // height: 50, - // width: SizeConfig.realScreenWidth * 0.35, - // child: ), - // ) - // ], - // ), - ], - ), + ) + ])), + ]), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Expanded( + child: Button( + title: TranslationBase.of(context).login, + color: HexColor('#D02127'), + onTap: () { + login(context, authProv, widget.changeLoadingStata); + }, + )), + ], + ) + // Row( + // mainAxisAlignment: MainAxisAlignment.end, + // children: [ + // RaisedButton( + // onPressed: () { + // login(context, authProv, widget.changeLoadingStata); + // }, + // textColor: Colors.white, + // elevation: 0.0, + // padding: const EdgeInsets.all(0.0), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(10), + // side: BorderSide(width: 0.5, color: HexColor('#CCCCCC'))), + // child: Container( + // padding: const EdgeInsets.all(10.0), + // height: 50, + // width: SizeConfig.realScreenWidth * 0.35, + // child: ), + // ) + // ], + // ), + ], ), ); } diff --git a/lib/widgets/auth/verification_methods.dart b/lib/widgets/auth/verification_methods.dart index cbd2e730..f64221b8 100644 --- a/lib/widgets/auth/verification_methods.dart +++ b/lib/widgets/auth/verification_methods.dart @@ -155,7 +155,7 @@ class _VerificationMethodsState extends State { child: Row( children: [ Flexible( - flex: 4, + flex: 3, child: ListTile( title: Text( TranslationBase.of( @@ -164,15 +164,17 @@ class _VerificationMethodsState extends State { overflow: TextOverflow .ellipsis, style: TextStyle( - fontFamily: 'Poppins', - fontWeight: - FontWeight.w600, - ), + fontFamily: + 'Poppins', + fontWeight: + FontWeight.w800, + fontSize: 14), ), subtitle: AppText( getType( user.logInTypeID, context), + fontSize: 14, ) // Text( // user.editedOn != null @@ -208,6 +210,9 @@ class _VerificationMethodsState extends State { : '--', textAlign: TextAlign.right, + fontSize: 14, + fontWeight: + FontWeight.w800, ), subtitle: AppText( user.editedOn != null @@ -223,6 +228,7 @@ class _VerificationMethodsState extends State { : '--', textAlign: TextAlign.right, + fontSize: 14, ), )) ], @@ -487,8 +493,8 @@ class _VerificationMethodsState extends State { children: [ Image.asset( 'assets/images/verify-whtsapp.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), ], ), @@ -497,7 +503,8 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).verifyWhatsApp, - fontSize: SizeConfig.textMultiplier * 2.2, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -520,8 +527,8 @@ class _VerificationMethodsState extends State { children: [ Image.asset( 'assets/images/verify-sms.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), projectsProvider.isArabic ? SizedBox( @@ -532,9 +539,8 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).verifySMS, - fontSize: projectsProvider.isArabic - ? SizeConfig.textMultiplier * 1.8 - : SizeConfig.textMultiplier * 2.2, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -560,15 +566,16 @@ class _VerificationMethodsState extends State { children: [ Image.asset( 'assets/images/verification_fingerprint_icon.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyFingerprint, - fontSize: SizeConfig.textMultiplier * 2.2, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -602,15 +609,16 @@ class _VerificationMethodsState extends State { children: [ Image.asset( 'assets/images/verification_faceid_icon.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), SizedBox( height: 20, ), AppText( TranslationBase.of(context).verifyFaceID, - fontSize: SizeConfig.textMultiplier * 2.2, + fontSize: 14, + fontWeight: FontWeight.w600, ) ], ), @@ -640,8 +648,8 @@ class _VerificationMethodsState extends State { children: [ Image.asset( 'assets/images/login/more_icon.png', - height: SizeConfig.imageSizeMultiplier * 13, - width: SizeConfig.imageSizeMultiplier * 16, + height: 60, + width: 60, ), projectsProvider.isArabic ? SizedBox( @@ -652,7 +660,8 @@ class _VerificationMethodsState extends State { ), AppText( TranslationBase.of(context).moreVerification, - fontSize: SizeConfig.textMultiplier * 2.2, + fontSize: 14, + fontWeight: FontWeight.w600, // textAlign: TextAlign.center, ) ], diff --git a/lib/widgets/doctor/my_schedule_widget.dart b/lib/widgets/doctor/my_schedule_widget.dart index d705010d..40b24cba 100644 --- a/lib/widgets/doctor/my_schedule_widget.dart +++ b/lib/widgets/doctor/my_schedule_widget.dart @@ -35,9 +35,6 @@ class MyScheduleWidget extends StatelessWidget { fontFamily: 'Poppins', // fontSize: 18 ), - SizedBox( - height: 10, - ), AppText( ' ${workingHoursTable.date.day} ${(DateUtils.getMonth(workingHoursTable.date.month).toString().substring(0, 3))}', fontSize: 18, diff --git a/lib/widgets/otp/sms-popup.dart b/lib/widgets/otp/sms-popup.dart index 9cdda71b..b60ebeb1 100644 --- a/lib/widgets/otp/sms-popup.dart +++ b/lib/widgets/otp/sms-popup.dart @@ -60,20 +60,8 @@ class SMSOTP { builder: (context) { projectProvider = Provider.of(context); return AlertDialog( - contentPadding: EdgeInsets.fromLTRB(24.0, 20.0, 0.0, 24.0), - title: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - IconButton( - icon: Icon(Icons.close), - onPressed: () { - this.isClosed = true; - Navigator.pop(context); - this.onFailure(); - }, - ) - ], - ), + contentPadding: EdgeInsets.fromLTRB(24.0, 0.0, 0.0, 24.0), + // shape: RoundedRectangleBorder( // borderRadius: BorderRadius.all(Radius.circular(10.0))), content: StatefulBuilder(builder: (context, setState) { @@ -89,21 +77,44 @@ class SMSOTP { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - type == 1 - ? Padding( - child: Icon( - DoctorApp.verify_sms_1, - size: 40, - ), - padding: EdgeInsets.only(bottom: 20), - ) - : Padding( - child: Icon( - DoctorApp.verify_whtsapp, - size: 40, - ), - padding: EdgeInsets.only(bottom: 20), - ), + Padding( + padding: EdgeInsets.all(10), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + type == 1 + ? Padding( + child: Icon( + DoctorApp.verify_sms_1, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ) + : Padding( + child: Icon( + DoctorApp.verify_whtsapp, + size: 40, + ), + padding: EdgeInsets.only(bottom: 20), + ), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Padding( + padding: EdgeInsets.only( + left: 10, right: 10, bottom: 20), + child: IconButton( + icon: Icon(Icons.close), + iconSize: 40, + onPressed: () { + this.isClosed = true; + Navigator.pop(context); + this.onFailure(); + }, + )) + ], + ) + ])), Padding( padding: EdgeInsets.only(top: 5), child: AppText( @@ -122,7 +133,7 @@ class SMSOTP { child: Directionality( textDirection: TextDirection.ltr, child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, + mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Container( width: SizeConfig.realScreenWidth * 0.15, @@ -233,22 +244,23 @@ class SMSOTP { )), ), ), - Padding( - padding: EdgeInsets.only(top: 10), - child: Row(children: [ - Expanded( - child: AppText( - TranslationBase.of(context).validationMessage + ' ', - fontWeight: FontWeight.w600, - ), + Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).validationMessage + ' ', + fontWeight: FontWeight.w600, + fontSize: 14, ), AppText( displayTime, color: Colors.red, - textAlign: TextAlign.center, + textAlign: TextAlign.start, fontWeight: FontWeight.bold, + fontSize: 14, ) - ])) + ]) ], ))), ); diff --git a/lib/widgets/patients/profile/profile-welcome-widget.dart b/lib/widgets/patients/profile/profile-welcome-widget.dart index 72f06fb1..d691446e 100644 --- a/lib/widgets/patients/profile/profile-welcome-widget.dart +++ b/lib/widgets/patients/profile/profile-welcome-widget.dart @@ -57,7 +57,7 @@ class ProfileWelcomeWidget extends StatelessWidget { CircleAvatar( // radius: (52) child: ClipRRect( - borderRadius: BorderRadius.circular(10), + borderRadius: BorderRadius.circular(20), child: Image.network( authProvider.doctorProfile.doctorImageURL, fit: BoxFit.fill, diff --git a/lib/widgets/patients/profile/soap_update/steps_widget.dart b/lib/widgets/patients/profile/soap_update/steps_widget.dart index 0abc84c7..b1432752 100644 --- a/lib/widgets/patients/profile/soap_update/steps_widget.dart +++ b/lib/widgets/patients/profile/soap_update/steps_widget.dart @@ -26,7 +26,7 @@ class StepsWidget extends StatelessWidget { color: Colors.transparent, child: Center( child: Container( - width: MediaQuery.of(context).size.width * 0.87, + width: MediaQuery.of(context).size.width * 0.86, child: Divider( color: Colors.grey, height: 0.75, diff --git a/lib/widgets/patients/profile/soap_update/update_plan_page.dart b/lib/widgets/patients/profile/soap_update/update_plan_page.dart index 5c69a8ae..e965d482 100644 --- a/lib/widgets/patients/profile/soap_update/update_plan_page.dart +++ b/lib/widgets/patients/profile/soap_update/update_plan_page.dart @@ -4,6 +4,7 @@ import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/SOAP_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteReqModel.dart'; import 'package:doctor_app_flutter/models/SOAP/GetGetProgressNoteResModel.dart'; import 'package:doctor_app_flutter/models/SOAP/post_progress_note_request_model.dart'; @@ -44,8 +45,7 @@ class UpdatePlanPage extends StatefulWidget { } class _UpdatePlanPageState extends State { - bool isProgressNoteExpand = false; - + bool isAddProgress = true; TextEditingController progressNoteController = TextEditingController(text: null); @@ -62,7 +62,17 @@ class _UpdatePlanPageState extends State { )), ); } - TextEditingController typeController = TextEditingController(); + + @override + void initState() { + super.initState(); + if(widget.patientProgressNote.planNote !=null ){ + setState(() { + isAddProgress = false; + }); + } + } + @override Widget build(BuildContext context) { @@ -83,7 +93,9 @@ class _UpdatePlanPageState extends State { widget.patientProgressNote.createdOn = model.patientProgressNoteList[0].createdOn; widget.patientProgressNote.editedOn = model.patientProgressNoteList[0].editedOn; widget.patientProgressNote.editedByName = model.patientProgressNoteList[0].editedByName; - + setState(() { + isAddProgress = false; + }); } widget.changeLoadingState(false); }, @@ -111,166 +123,98 @@ class _UpdatePlanPageState extends State { child: Column( mainAxisAlignment: MainAxisAlignment.start, children: [ - SizedBox( - height: 10, - ), - HeaderBodyExpandableNotifier( - headerWidget: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Row( - children: [ - Texts(TranslationBase - .of(context) - .progressNoteSOAP, - variant: isProgressNoteExpand ? "bodyText" : '', - bold: isProgressNoteExpand ? true : false, - color: Colors.black), - Icon( - FontAwesomeIcons.asterisk, - color: Colors.black, - size: 12, - ) - ], - ), - InkWell( - onTap: () { - setState(() { - isProgressNoteExpand = !isProgressNoteExpand; - }); + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Container( + margin: EdgeInsets.only(left: 5, right: 5), + child: Texts(TranslationBase.of(context).progressNote)), + if( isAddProgress) + Container( + margin: EdgeInsets.only(left: 10, right: 10, top: 15), + child: AppTextFieldCustom( + hintText: TranslationBase.of(context).progressNote, + controller: progressNoteController, + minLines: 2, + maxLines: 4, + inputType: TextInputType.multiline, + onChanged: (value){ + widget.patientProgressNote.planNote = value; }, - child: Icon(isProgressNoteExpand - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down)) - ], - ), - bodyWidget: Column(children: [ + ), + ), SizedBox( - height: 2, + height: 9, ), - Column( - children: [ - if(widget.patientProgressNote.planNote == null) - Container( - margin: - EdgeInsets.only(left: 10, right: 10, top: 15), - - child: AppTextFieldCustom( - hintText: TranslationBase.of(context).progressNote, - controller: progressNoteController, - minLines: 2, - maxLines: 4, - inputType: TextInputType.multiline, - onChanged: (value){ - // examination.remark = value; - }, - ), - ), - SizedBox( - height: 20, - ), - if ( widget.patientProgressNote.planNote != null) - Container( - margin: - EdgeInsets.only(left: 5, right: 5, top: 15), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + if ( widget.patientProgressNote.planNote != null && !isAddProgress) + Container( + margin: + EdgeInsets.only(left: 5, right: 5,), + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, children: [ - - SizedBox( - height: 8, - ), Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - Row( - children: [ - Texts('Appointment No: '), - Texts(widget.patientProgressNote.appointmentNo.toString()), - - ], - ), - AppText( - widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), - fontWeight: FontWeight - .bold, - fontSize: 16, - ) + Texts('Appointment No: ',fontSize: 12,), + Texts(widget.patientProgressNote.appointmentNo??'',fontWeight: FontWeight.w600,), ], ), - Row( - children: [ - Texts('Condition: '), - Texts(widget.patientProgressNote.mName.toString()), + Texts( + widget.patientProgressNote.createdOn !=null?DateUtils.getDayMonthYearDateFormatted(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getDayMonthYearDateFormatted(DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ) - ], - ), - if(widget.patientProgressNote.createdByName !=null) - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).createdBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.createdByName??"", - fontSize: 10, - color: Colors.grey, - ), - ], - ), - if(widget.patientProgressNote.editedByName !=null) + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ Row( - mainAxisAlignment: - MainAxisAlignment.start, children: [ - AppText( - TranslationBase.of(context).editedBy, - fontWeight: FontWeight.bold, - fontSize: 16, - ), - AppText( - widget.patientProgressNote.editedByName??"", - fontSize: 10, - color: Colors.grey, - ), + Texts('Condition: ',fontSize: 12,), + Texts(widget.patientProgressNote.mName??'',fontWeight: FontWeight.w600), ], ), - Row( - mainAxisAlignment: - MainAxisAlignment.start, - children: [ - SizedBox( - height: 6, - ), - Padding( - padding: const EdgeInsets.all(0.0), - child: Container( - width: MediaQuery.of(context) - .size - .width * - 0.6, - child: Texts( - progressNoteController.text, - fontSize: 10, - color: Colors.grey, - ), - ), - ), - ], + Texts( + widget.patientProgressNote.createdOn !=null?DateUtils.getHour(DateTime.parse(widget.patientProgressNote.createdOn)):DateUtils.getHour(DateTime.now()), + fontWeight: FontWeight.w600, + fontSize: 14, + ) + ], + ), + SizedBox(height: 8,), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: Texts( + progressNoteController.text, + fontSize: 10, + + ), ), + InkWell( + onTap: (){ + setState(() { + isAddProgress = true; + widget.changePageViewIndex(3,isChangeState:false); + }); + }, + child: Icon(DoctorApp.edit,size: 18,)) ], ), - ) - ], - ) - ]), - isExpand: isProgressNoteExpand, + ], + ), + ) + ], ), ], @@ -281,56 +225,62 @@ class _UpdatePlanPageState extends State { ), bottomSheet: Container( width: double.maxFinite, - height: 70, - child: Container( - margin: EdgeInsets.all(6), - child: Column( - children: [ - - Row( - children: [ - Expanded( - child: AppButton( - title: 'Previous', - color: Colors.white38, - fontColor: Colors.black, - fontWeight: FontWeight.w700, - loading: model.state == ViewState.BusyLocal, - onPressed: () async { - setState(() { - widget.changePageViewIndex(2); - }); - }, + height: 90, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + margin: EdgeInsets.all(6), + child: Column( + children: [ + Row( + children: [ + Expanded( + child: AppButton( + title: 'Previous', + color: Colors.grey[300], + fontColor: Colors.black, + fontWeight: FontWeight.w400, + loading: model.state == ViewState.BusyLocal, + onPressed: () async { + setState(() { + widget.changePageViewIndex(2); + }); + }, + ), ), - ), - SizedBox(width: 5,), - Expanded( - child: AppButton( - title: TranslationBase.of(context).next, - fontWeight: FontWeight.w700, - loading: model.state == ViewState.BusyLocal, - disabled: progressNoteController.text.isEmpty, - onPressed: () async { + SizedBox(width: 5,), + Expanded( + child: AppButton( + title: isAddProgress? TranslationBase.of(context).next: "Finish", + fontWeight: FontWeight.w400, + loading: model.state == ViewState.BusyLocal, + color: Colors.red[700], + disabled: progressNoteController.text.isEmpty, + onPressed: () async { - if(widget.patientProgressNote.planNote.isEmpty) { - Map profile = await sharedPref.getObj(DOCTOR_PROFILE); - DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); - setState(() { - widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName ?? doctorProfile.doctorName; - widget.patientProgressNote.editedByName = doctorProfile.doctorName; - widget.patientProgressNote.createdOn = DateTime.now().toString(); - widget.patientProgressNote.planNote = progressNoteController.text; - }); + if(isAddProgress) { + Map profile = await sharedPref.getObj(DOCTOR_PROFILE); + DoctorProfileModel doctorProfile = DoctorProfileModel.fromJson(profile); + setState(() { + widget.patientProgressNote.createdByName = widget.patientProgressNote.createdByName ?? doctorProfile.doctorName; + widget.patientProgressNote.editedByName = doctorProfile.doctorName; + widget.patientProgressNote.createdOn = DateTime.now().toString(); + widget.patientProgressNote.planNote = progressNoteController.text; + isAddProgress = !isAddProgress; + }); + submitPlan(model); - } else - submitPlan(model); - }, + } else{ + Navigator.of(context).pop(); + } + }, + ), ), - ), - ], - ), + ], + ), - ], + ], + ), ), ), ), @@ -361,7 +311,7 @@ class _UpdatePlanPageState extends State { if (model.state == ViewState.ErrorLocal) { helpers.showErrorToast(model.error); } else { - Navigator.of(context).pop(); + widget.changePageViewIndex(4,isChangeState:false); } } else { helpers.showErrorToast(TranslationBase.of(context).progressNoteErrorMsg); diff --git a/lib/widgets/patients/profile/soap_update/update_soap_index.dart b/lib/widgets/patients/profile/soap_update/update_soap_index.dart index 72c8c714..fa4631aa 100644 --- a/lib/widgets/patients/profile/soap_update/update_soap_index.dart +++ b/lib/widgets/patients/profile/soap_update/update_soap_index.dart @@ -38,9 +38,13 @@ class _UpdateSoapIndexState extends State GetPatientProgressNoteResModel patientProgressNote = GetPatientProgressNoteResModel(); - changePageViewIndex(pageIndex) { - if (pageIndex != _currentIndex) changeLoadingState(true); + changePageViewIndex(pageIndex,{isChangeState = true}) { + if (pageIndex != _currentIndex && isChangeState) + changeLoadingState(true); _controller.jumpToPage(pageIndex); + setState(() { + _currentIndex = pageIndex; + }); } bool _isLoading = true; @@ -95,7 +99,7 @@ class _UpdateSoapIndexState extends State child: StepsWidget( index: _currentIndex, changeCurrentTab: changePageViewIndex, - height: MediaQuery.of(context).size.height * 0.20, + height: 135,//MediaQuery.of(context).size.height * 0.17, ), ), Container( diff --git a/lib/widgets/shared/app_drawer_widget.dart b/lib/widgets/shared/app_drawer_widget.dart index 6193204d..324269c6 100644 --- a/lib/widgets/shared/app_drawer_widget.dart +++ b/lib/widgets/shared/app_drawer_widget.dart @@ -45,18 +45,36 @@ class _AppDrawerState extends State { flex: 4, child: ListView(padding: EdgeInsets.zero, children: [ Container( - margin: EdgeInsets.symmetric(horizontal: 20), + margin: EdgeInsets.symmetric(horizontal: 15), // height: SizeConfig.heightMultiplier * 50, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - child: Image.asset( - 'assets/images/dr_app_logo.png', - ), - margin: EdgeInsets.only(top: 10, bottom: 10), + Row( + children: [ + Container( + child: Image.asset( + 'assets/images/dr_app_logo.png', + ), + margin: EdgeInsets.only(top: 10, bottom: 10), + ), + Container( + child: InkWell( + onTap: (){ + Navigator.pop(context); + }, + child: Icon( + DoctorApp.close_1, + size: 20, + ), + ), + margin: EdgeInsets.only(top: 20, bottom: 10), + ) + ], + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.spaceBetween, ), - SizedBox(height: 10), + SizedBox(height: 5), if (authProvider.doctorProfile != null) InkWell( onTap: () { @@ -80,7 +98,7 @@ class _AppDrawerState extends State { ), ), Padding( - padding: EdgeInsets.only(top: 5), + padding: EdgeInsets.only(top: 0), child: AppText( authProvider.doctorProfile?.clinicDescription, fontWeight: FontWeight.w600, @@ -91,13 +109,10 @@ class _AppDrawerState extends State { ], ), ), - SizedBox(height: 10), + SizedBox(height: 40), InkWell( child: DrawerItem( - TranslationBase.of(context).rescheduleLeaves, - // " or " + - // TranslationBase.of(context).leaves, - + TranslationBase.of(context).applyOrRescheduleLeave, DoctorApp.reschedule__1, // subTitle: , ), @@ -111,19 +126,15 @@ class _AppDrawerState extends State { )); }, ), - - SizedBox(height: 10), + SizedBox(height: 15), InkWell( child: DrawerItem( - 'My QR Code', - // " or " + - // TranslationBase.of(context).leaves, - + TranslationBase.of(context).myQRCode, DoctorApp.qr_code_3, // subTitle: , ), ), - + SizedBox(height: 15), InkWell( child: Container( height: 80, @@ -138,14 +149,12 @@ class _AppDrawerState extends State { ), ), SizedBox( - height: 40, + height: 130, ), Container( margin: EdgeInsets.symmetric(horizontal: 20), child: Column( children: [ - - InkWell( child: DrawerItem( projectsProvider.isArabic @@ -159,6 +168,7 @@ class _AppDrawerState extends State { projectsProvider.changeLanguage('ar'); }, ), + SizedBox(height: 10), InkWell( child: DrawerItem( TranslationBase.of(context).logout, DoctorApp.logout_1), @@ -193,13 +203,13 @@ class _AppDrawerState extends State { style: TextStyle( color: Color(0xFF989898), fontWeight: FontWeight.bold, - fontSize: SizeConfig.textMultiplier * 2, + fontSize: 14, fontFamily: 'Poppins',), children: [ TextSpan(text: ' Cloud Solutions', style: TextStyle( color: Color(0xFF2E303A), - fontSize: SizeConfig.textMultiplier * 2, + fontSize: 15, fontFamily: 'Poppins',), ) ] diff --git a/lib/widgets/shared/bottom_nav_bar.dart b/lib/widgets/shared/bottom_nav_bar.dart index 0f5673ab..d3b07254 100644 --- a/lib/widgets/shared/bottom_nav_bar.dart +++ b/lib/widgets/shared/bottom_nav_bar.dart @@ -37,23 +37,23 @@ class _BottomNavBarState extends State { mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ BottomNavigationItem( - icon: DoctorApp.home_icon_active, - activeIcon: DoctorApp.home_active, + icon: DoctorApp.home_1, + activeIcon: DoctorApp.home_active_1, changeIndex: _changeIndex, index: _index, currentIndex: 0, name: TranslationBase.of(context).home, ), BottomNavigationItem( - icon: DoctorApp.schedule_icon, - activeIcon: DoctorApp.scdedule_icon_active_1, + icon: DoctorApp.schedule_1, + activeIcon: DoctorApp.schedule_active_1, changeIndex: _changeIndex, index: _index, currentIndex: 1, name: TranslationBase.of(context).mySchedule, ), BottomNavigationItem( - icon: DoctorApp.qr_code, + icon: DoctorApp.qr_reader, activeIcon: DoctorApp.qr_reader_active_1, changeIndex: _changeIndex, index: _index, @@ -61,7 +61,7 @@ class _BottomNavBarState extends State { name: TranslationBase.of(context).qr, ), BottomNavigationItem( - icon: DoctorApp.message_icon, + icon: DoctorApp.dr_reply_1, activeIcon: DoctorApp.dr_reply_active_1, changeIndex: _changeIndex, index: _index, diff --git a/lib/widgets/shared/bottom_navigation_item.dart b/lib/widgets/shared/bottom_navigation_item.dart index 501a354d..e69ff690 100644 --- a/lib/widgets/shared/bottom_navigation_item.dart +++ b/lib/widgets/shared/bottom_navigation_item.dart @@ -34,19 +34,10 @@ class BottomNavigationItem extends StatelessWidget { children: [ SizedBox(height: 15,), Container( -// decoration: BoxDecoration(boxShadow: [ -// BoxShadow( -// color: currentIndex == index -// ? Color.fromRGBO(78, 62, 253, 0.4) -// : Color.fromRGBO(78, 62, 253, 0), -// blurRadius: 9.0, -// spreadRadius: -4.0, -// offset: Offset(0.0, 2.0)) -// ]), child: Icon(currentIndex == index ? activeIcon : icon, - /*color: currentIndex == index - ? Theme.of(context).primaryColor - : Theme.of(context).dividerColor,*/ + color: currentIndex == index + ? Color(0xFF333C45) + : Theme.of(context).dividerColor, size: 22.0), ), SizedBox(height: 5,), diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index 42b001b3..6b144f53 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; +import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart'; import 'package:doctor_app_flutter/widgets/patients/profile/large_avatar.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; import 'package:flutter/cupertino.dart'; @@ -89,7 +90,7 @@ class DoctorCardInsurance extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(5.0), child: Texts( - '$patientOut', + '$patientOut'.replaceAll(" ", ""), color: Colors.white, fontSize: 13.0, ), @@ -102,7 +103,7 @@ class DoctorCardInsurance extends StatelessWidget { Expanded( child: Texts( doctorName, - bold: true, + fontWeight: FontWeight.w700, )), ], ), @@ -153,11 +154,13 @@ class DoctorCardInsurance extends StatelessWidget { children: [ Texts( 'Clinic: ', - color: Colors.grey[500], + //fontWeight: FontWeight.w600, + //color: Colors.grey[500], ), Expanded( child: Texts( clinic, + fontWeight: FontWeight.w700, ), ) ], @@ -167,19 +170,24 @@ class DoctorCardInsurance extends StatelessWidget { children: [ Texts( 'Approval No: ', - color: Colors.grey[500], + //color: Colors.grey[500], ), Texts( branch, + fontWeight: FontWeight.w700, ) ], ) ]), ), ), - Icon( - EvaIcons.eye, - size: 38.0, + Padding( + padding: + const EdgeInsets.symmetric(horizontal: 15.0), + child: Icon( + DoctorApp.view, + size: 22.0, + ), ) ], ), diff --git a/lib/widgets/shared/drawer_item_widget.dart b/lib/widgets/shared/drawer_item_widget.dart index 248123a6..1a34a8ca 100644 --- a/lib/widgets/shared/drawer_item_widget.dart +++ b/lib/widgets/shared/drawer_item_widget.dart @@ -26,7 +26,7 @@ class _DrawerItemState extends State { @override Widget build(BuildContext context) { return Container( - margin: EdgeInsets.only(top: 5, bottom: 5, left: 0, right: 0), + margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -49,16 +49,9 @@ class _DrawerItemState extends State { color:widget.color ??Color(0xFF2E303A), fontSize: 14, fontFamily: 'Poppins', - fontWeight: FontWeight.bold, + fontWeight: FontWeight.w600, ), ), - AppText( - widget.subTitle, - visibility: !widget.subTitle.isNullOrEmpty(), - color: widget.color ?? Colors.black, - marginLeft: 5, - fontSize: SizeConfig.textMultiplier * 2.5, - ), ], ), ), diff --git a/lib/widgets/shared/expandable-widget-header-body.dart b/lib/widgets/shared/expandable-widget-header-body.dart index 7adef404..97930285 100644 --- a/lib/widgets/shared/expandable-widget-header-body.dart +++ b/lib/widgets/shared/expandable-widget-header-body.dart @@ -18,14 +18,14 @@ class HeaderBodyExpandableNotifier extends StatefulWidget { class _HeaderBodyExpandableNotifierState extends State { + + @override + void initState() { + super.initState(); + + } @override Widget build(BuildContext context) { - setState(() { - if (widget.isExpand == true) { - widget.expandFlag = widget.isExpand; - widget.controller.expanded = true; - } - }); return ExpandableNotifier( child: Padding( diff --git a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart index f84db092..f85d2fe6 100644 --- a/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart +++ b/lib/widgets/shared/master_key_checkbox_search_allergies_widget.dart @@ -137,14 +137,29 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState items[index]), activeColor: Colors.red[800], onChanged: (bool newValue) { - // setState(() { - // if (widget - // .isServiceSelected(items[index])) { - // widget.removeHistory(items[index]); - // } else { - // widget.addHistory(items[index]); - // } - // }); + setState(() { + if (widget + .isServiceSelected( + items[index])) { + widget.removeAllergy( + items[index]); + } else { + // TODO add Allergy + + MySelectedAllergy + mySelectedAllergy = + new MySelectedAllergy( + selectedAllergy: + items[index], + selectedAllergySeverity: + _selectedAllergySeverity, + remark: null, + isChecked: true, + isExpanded: true); + widget.addAllergy( + mySelectedAllergy); + } + }); }), InkWell( onTap: () {