fix episode part

merge-requests/933/head
Elham Rababh 4 years ago
parent 8dade058a4
commit 729d784ff1

@ -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;

@ -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<PatiantInformtion> _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<PatiantInformtion> 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);
}
});

@ -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<UpdateObjectivePage>
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<UpdateObjectivePage>
/// remove items.
List<MySelectedExamination> removedList = [];
mySelectedExamination.forEach((element) {
if ((mySelectedExaminationLocal.singleWhere(
if ((mySelectedExaminationLocal.singleWhereOrNull(
(it) =>
it.selectedExamination!.id ==
element.selectedExamination!.id,

@ -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<UpdateAllergiesWidget> {
});
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<UpdateAllergiesWidget> {
/// remove items.
List<MySelectedAllergy> removedList = [];
widget.myAllergiesList.forEach((element) {
if ((mySelectedAllergy.singleWhere(
if ((mySelectedAllergy.singleWhereOrNull(
(it) =>
it.selectedAllergy!.id ==
element.selectedAllergy!.id)) ==

@ -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<AppButton> {
@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,

Loading…
Cancel
Save