diff --git a/lib/screens/patients/In_patient/InPatientHeader.dart b/lib/screens/patients/In_patient/InPatientHeader.dart index 11cc4dcc..f2d0f74e 100644 --- a/lib/screens/patients/In_patient/InPatientHeader.dart +++ b/lib/screens/patients/In_patient/InPatientHeader.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/models/dashboard/get_special_clinical_care_Li import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; class InPatientHeader extends StatelessWidget with PreferredSizeWidget { @@ -52,70 +53,71 @@ class InPatientHeader extends StatelessWidget with PreferredSizeWidget { activeTab != 2) Container( width: MediaQuery.of(context).size.width * .3, - child: DropdownButtonHideUnderline( - child: DropdownButton( - dropdownColor: Colors.white, - iconEnabledColor: Colors.black, - isExpanded: true, - value: selectedMapId == null - ? TranslationBase.of(context).all - : selectedMapId, - iconSize: 25, - elevation: 16, - selectedItemBuilder: (BuildContext context) { - return model.specialClinicalCareMappingList.map((item) { - return Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Container( - padding: EdgeInsets.all(2), - margin: EdgeInsets.all(2), - decoration: new BoxDecoration( - color: Colors.red[800], - borderRadius: BorderRadius.circular(20), - ), - constraints: BoxConstraints( - minWidth: 20, - minHeight: 20, - ), - child: Center( - child: AppText( - model.specialClinicalCareMappingList.length - .toString(), - color: Colors.white, - fontSize: - projectsProvider.isArabic ? 10 : 11, - textAlign: TextAlign.center, - ), - )), - ], - ), - AppText(item.description, - fontSize: 12, - color: Colors.black, - fontWeight: FontWeight.bold, - textAlign: TextAlign.end), - ], - ); - }).toList(); - }, - onChanged: (newValue) async { - onChangeFunc(newValue); - }, - items: model.specialClinicalCareMappingList.map((item) { - return DropdownMenuItem( - child: AppText( - item.description, - textAlign: TextAlign.left, - ), - value: item.nursingStationID, - ); - }).toList(), - )), + child + : DropdownButtonHideUnderline( + child: DropdownButton( + dropdownColor: Colors.white, + iconEnabledColor: Colors.black, + isExpanded: true, + value: selectedMapId??model.specialClinicalCareMappingList[0].nursingStationID, + iconSize: 25, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return model.specialClinicalCareMappingList.map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + padding: EdgeInsets.all(2), + margin: EdgeInsets.all(2), + decoration: new BoxDecoration( + color: Colors.red[800], + borderRadius: BorderRadius.circular(20), + ), + constraints: BoxConstraints( + minWidth: 20, + minHeight: 20, + ), + child: Center( + child: AppText( + model.specialClinicalCareMappingList + .length + .toString(), + color: Colors.white, + fontSize: projectsProvider.isArabic + ? 10 + : 11, + textAlign: TextAlign.center, + ), + )), + ], + ), + AppText(selectedMapId == null?TranslationBase.of(context).all:item.description, + fontSize: 12, + color: Colors.black, + fontWeight: FontWeight.bold, + textAlign: TextAlign.end), + ], + ); + }).toList(); + }, + onChanged: (newValue) async { + onChangeFunc(newValue); + }, + items: model.specialClinicalCareMappingList.map((item) { + return DropdownMenuItem( + child: AppText( + item.description, + textAlign: TextAlign.left, + ), + value: item.nursingStationID, + ); + }).toList(), + )), ), ]), ), diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index 9508a3cf..ef9f8b03 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -67,12 +67,12 @@ class _InPatientScreenState extends State return BaseView( onModelReady: (model) async { model.clearPatientList(); - // if (widget.specialClinic != null) { - // await model - // .getSpecialClinicalCareMappingList(widget.specialClinic.clinicID); - // requestModel.nursingStationID = - // model.specialClinicalCareMappingList[0].nursingStationID; - // } + if (widget.specialClinic != null) { + await model + .getSpecialClinicalCareMappingList(widget.specialClinic.clinicID); + // requestModel.nursingStationID = + // model.specialClinicalCareMappingList[0].nursingStationID; + } requestModel.clinicID = 0; await model.getInPatientList(requestModel); },