diff --git a/lib/client/base_app_client.dart b/lib/client/base_app_client.dart index 15ae3382..6d823a92 100644 --- a/lib/client/base_app_client.dart +++ b/lib/client/base_app_client.dart @@ -47,7 +47,6 @@ class BaseAppClient { if (body['ProjectID'] == null) { body['ProjectID'] = doctorProfile!.projectID; } - if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile!.clinicID; if (body['DoctorID'] == '') { body['DoctorID'] = null; diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index 3ef3c548..9629d0bb 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -8,6 +8,7 @@ import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; import 'package:doctor_app_flutter/models/livecare/start_call_req.dart'; import 'package:doctor_app_flutter/models/livecare/start_call_res.dart'; import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart'; +import 'package:collection/collection.dart'; class LiveCarePatientServices extends BaseService { List _patientList = []; @@ -47,7 +48,7 @@ class LiveCarePatientServices extends BaseService { /// add new items. localPatientList.forEach((element) { - if ((_patientList.singleWhere((it) => it.patientId == element.patientId)) == null) { + if ((_patientList.singleWhereOrNull((it) => it.patientId == element.patientId)) == null) { _patientList.add(element); } }); @@ -55,7 +56,7 @@ class LiveCarePatientServices extends BaseService { /// remove items. List removedPatientList = []; _patientList.forEach((element) { - if ((localPatientList.singleWhere((it) => it.patientId == element.patientId)) == null) { + if ((localPatientList.singleWhereOrNull((it) => it.patientId == element.patientId)) == null) { removedPatientList.add(element); } }); diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index d9d55925..c8d968fa 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -23,7 +23,7 @@ import '../shared_soap_widgets/expandable_SOAP_widget.dart'; import 'add_examination_page.dart'; import 'examination_item_card.dart'; import 'objective_call_back.dart'; - +import 'package:collection/collection.dart'; class UpdateObjectivePage extends StatefulWidget { final Function changePageViewIndex; final Function changeLoadingState; @@ -320,7 +320,7 @@ class _UpdateObjectivePageState extends State setState(() { { mySelectedExaminationLocal.forEach((element) { - if ((mySelectedExamination.singleWhere( + if ((mySelectedExamination.singleWhereOrNull( (it) => it.selectedExamination!.id == element.selectedExamination!.id)) == @@ -332,7 +332,7 @@ class _UpdateObjectivePageState extends State /// remove items. List removedList = []; mySelectedExamination.forEach((element) { - if ((mySelectedExaminationLocal.singleWhere( + if ((mySelectedExaminationLocal.singleWhereOrNull( (it) => it.selectedExamination!.id == element.selectedExamination!.id, diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart index 297d77ab..e174a4a3 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/update_allergies_widget.dart @@ -12,6 +12,7 @@ import 'package:provider/provider.dart'; import '../../shared_soap_widgets/SOAP_open_items.dart'; import 'add_allergies.dart'; +import 'package:collection/collection.dart'; // ignore: must_be_immutable class UpdateAllergiesWidget extends StatefulWidget { @@ -163,7 +164,7 @@ class _UpdateAllergiesWidgetState extends State { }); if (isAllDataFilled) { mySelectedAllergy.forEach((element) { - if ((widget.myAllergiesList.singleWhere( + if ((widget.myAllergiesList.singleWhereOrNull( (it) => it.selectedAllergy!.id == element.selectedAllergy!.id,)) == @@ -175,7 +176,7 @@ class _UpdateAllergiesWidgetState extends State { /// remove items. List removedList = []; widget.myAllergiesList.forEach((element) { - if ((mySelectedAllergy.singleWhere( + if ((mySelectedAllergy.singleWhereOrNull( (it) => it.selectedAllergy!.id == element.selectedAllergy!.id)) == diff --git a/lib/widgets/shared/buttons/app_buttons_widget.dart b/lib/widgets/shared/buttons/app_buttons_widget.dart index 7109b6cb..c863aeac 100644 --- a/lib/widgets/shared/buttons/app_buttons_widget.dart +++ b/lib/widgets/shared/buttons/app_buttons_widget.dart @@ -13,7 +13,7 @@ class AppButton extends StatefulWidget { final IconData? iconData; final Widget? icon; final Color? color; - final double? fontSize; + late double? fontSize; final double? padding; final Color? fontColor; final bool? loading; @@ -32,7 +32,7 @@ class AppButton extends StatefulWidget { this.iconData, this.icon, this.color, - this.fontSize = 16, + this.fontSize, this.padding = 13, this.loading = false, this.disabled = false, @@ -52,6 +52,9 @@ class AppButton extends StatefulWidget { class _AppButtonState extends State { @override Widget build(BuildContext context) { + if(widget.fontSize == null) { + widget.fontSize = SizeConfig.getHeightMultiplier() * 1.9; + } return Container( // height: MediaQuery.of(context).size.height * 0.075, height: widget.height,