diff --git a/lib/screens/medical-file/medical_file_page.dart b/lib/screens/medical-file/medical_file_page.dart index a5fab36e..c4553c07 100644 --- a/lib/screens/medical-file/medical_file_page.dart +++ b/lib/screens/medical-file/medical_file_page.dart @@ -34,6 +34,10 @@ class _MedicalFilePageState extends State { child: SingleChildScrollView( child: Container( child: Column( + // mainAxisAlignment: model.medicalFileList.length != 0 && + // model.medicalFileList != null + // ? MainAxisAlignment.start + // : MainAxisAlignment.center, children: [ PatientPageHeaderWidget(patient), Divider( diff --git a/lib/screens/procedures/entity_list_checkbox_search_widget.dart b/lib/screens/procedures/entity_list_checkbox_search_widget.dart index 4f236a4b..7036bc0d 100644 --- a/lib/screens/procedures/entity_list_checkbox_search_widget.dart +++ b/lib/screens/procedures/entity_list_checkbox_search_widget.dart @@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/Text.dart'; import 'package:doctor_app_flutter/widgets/shared/TextFields.dart'; import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:eva_icons_flutter/eva_icons_flutter.dart'; @@ -71,43 +72,53 @@ class _EntityListCheckboxSearchWidgetState SizedBox( height: 15, ), - Column( - children: items.map((historyInfo) { - return Column( - children: [ - Row( - children: [ - Checkbox( - value: widget - .isEntityListSelected(historyInfo), - activeColor: Colors.red[800], - onChanged: (bool newValue) { - setState(() { - if (widget.isEntityListSelected( - historyInfo)) { - widget.removeHistory(historyInfo); - } else { - widget.addHistory(historyInfo); - } - }); - }), - Expanded( - child: Padding( - padding: const EdgeInsets.symmetric( - horizontal: 10, vertical: 0), - child: Texts(historyInfo.procedureName, - variant: "bodyText", - bold: true, - color: Colors.black), + items.length != 0 + ? Column( + children: items.map((historyInfo) { + return Column( + children: [ + Row( + children: [ + Checkbox( + value: widget.isEntityListSelected( + historyInfo), + activeColor: Colors.red[800], + onChanged: (bool newValue) { + setState(() { + if (widget.isEntityListSelected( + historyInfo)) { + widget + .removeHistory(historyInfo); + } else { + widget.addHistory(historyInfo); + } + }); + }), + Expanded( + child: Padding( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 0), + child: Texts( + historyInfo.procedureName, + variant: "bodyText", + bold: true, + color: Colors.black), + ), + ), + ], ), - ), - ], + DividerWithSpacesAround(), + ], + ); + }).toList(), + ) + : Center( + child: Container( + child: AppText( + "There's no procedures for this category", + color: Color(0xFFB9382C)), ), - DividerWithSpacesAround(), - ], - ); - }).toList(), - ), + ) ], ), )), diff --git a/lib/screens/procedures/procedure_screen.dart b/lib/screens/procedures/procedure_screen.dart index 05850316..d6d38a54 100644 --- a/lib/screens/procedures/procedure_screen.dart +++ b/lib/screens/procedures/procedure_screen.dart @@ -438,11 +438,10 @@ class _ProcedureScreenState extends State { 0.10, child: AppText( - model - .procedureList[0] - .entityList[index] - .remarks - .toString(), + model.procedureList[0].entityList[index].remarks != + null + ? model.procedureList[0].entityList[index].remarks.toString() + : "", fontSize: 11.5, ),