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) { if (body['ProjectID'] == null) {
body['ProjectID'] = doctorProfile!.projectID; body['ProjectID'] = doctorProfile!.projectID;
} }
if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile!.clinicID; if (body['ClinicID'] == null) body['ClinicID'] = doctorProfile!.clinicID;
if (body['DoctorID'] == '') { if (body['DoctorID'] == '') {
body['DoctorID'] = null; 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_req.dart';
import 'package:doctor_app_flutter/models/livecare/start_call_res.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:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:collection/collection.dart';
class LiveCarePatientServices extends BaseService { class LiveCarePatientServices extends BaseService {
List<PatiantInformtion> _patientList = []; List<PatiantInformtion> _patientList = [];
@ -47,7 +48,7 @@ class LiveCarePatientServices extends BaseService {
/// add new items. /// add new items.
localPatientList.forEach((element) { localPatientList.forEach((element) {
if ((_patientList.singleWhere((it) => it.patientId == element.patientId)) == null) { if ((_patientList.singleWhereOrNull((it) => it.patientId == element.patientId)) == null) {
_patientList.add(element); _patientList.add(element);
} }
}); });
@ -55,7 +56,7 @@ class LiveCarePatientServices extends BaseService {
/// remove items. /// remove items.
List<PatiantInformtion> removedPatientList = []; List<PatiantInformtion> removedPatientList = [];
_patientList.forEach((element) { _patientList.forEach((element) {
if ((localPatientList.singleWhere((it) => it.patientId == element.patientId)) == null) { if ((localPatientList.singleWhereOrNull((it) => it.patientId == element.patientId)) == null) {
removedPatientList.add(element); removedPatientList.add(element);
} }
}); });

@ -23,7 +23,7 @@ import '../shared_soap_widgets/expandable_SOAP_widget.dart';
import 'add_examination_page.dart'; import 'add_examination_page.dart';
import 'examination_item_card.dart'; import 'examination_item_card.dart';
import 'objective_call_back.dart'; import 'objective_call_back.dart';
import 'package:collection/collection.dart';
class UpdateObjectivePage extends StatefulWidget { class UpdateObjectivePage extends StatefulWidget {
final Function changePageViewIndex; final Function changePageViewIndex;
final Function changeLoadingState; final Function changeLoadingState;
@ -320,7 +320,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
setState(() { setState(() {
{ {
mySelectedExaminationLocal.forEach((element) { mySelectedExaminationLocal.forEach((element) {
if ((mySelectedExamination.singleWhere( if ((mySelectedExamination.singleWhereOrNull(
(it) => (it) =>
it.selectedExamination!.id == it.selectedExamination!.id ==
element.selectedExamination!.id)) == element.selectedExamination!.id)) ==
@ -332,7 +332,7 @@ class _UpdateObjectivePageState extends State<UpdateObjectivePage>
/// remove items. /// remove items.
List<MySelectedExamination> removedList = []; List<MySelectedExamination> removedList = [];
mySelectedExamination.forEach((element) { mySelectedExamination.forEach((element) {
if ((mySelectedExaminationLocal.singleWhere( if ((mySelectedExaminationLocal.singleWhereOrNull(
(it) => (it) =>
it.selectedExamination!.id == it.selectedExamination!.id ==
element.selectedExamination!.id, element.selectedExamination!.id,

@ -12,6 +12,7 @@ import 'package:provider/provider.dart';
import '../../shared_soap_widgets/SOAP_open_items.dart'; import '../../shared_soap_widgets/SOAP_open_items.dart';
import 'add_allergies.dart'; import 'add_allergies.dart';
import 'package:collection/collection.dart';
// ignore: must_be_immutable // ignore: must_be_immutable
class UpdateAllergiesWidget extends StatefulWidget { class UpdateAllergiesWidget extends StatefulWidget {
@ -163,7 +164,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
}); });
if (isAllDataFilled) { if (isAllDataFilled) {
mySelectedAllergy.forEach((element) { mySelectedAllergy.forEach((element) {
if ((widget.myAllergiesList.singleWhere( if ((widget.myAllergiesList.singleWhereOrNull(
(it) => (it) =>
it.selectedAllergy!.id == it.selectedAllergy!.id ==
element.selectedAllergy!.id,)) == element.selectedAllergy!.id,)) ==
@ -175,7 +176,7 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidget> {
/// remove items. /// remove items.
List<MySelectedAllergy> removedList = []; List<MySelectedAllergy> removedList = [];
widget.myAllergiesList.forEach((element) { widget.myAllergiesList.forEach((element) {
if ((mySelectedAllergy.singleWhere( if ((mySelectedAllergy.singleWhereOrNull(
(it) => (it) =>
it.selectedAllergy!.id == it.selectedAllergy!.id ==
element.selectedAllergy!.id)) == element.selectedAllergy!.id)) ==

@ -13,7 +13,7 @@ class AppButton extends StatefulWidget {
final IconData? iconData; final IconData? iconData;
final Widget? icon; final Widget? icon;
final Color? color; final Color? color;
final double? fontSize; late double? fontSize;
final double? padding; final double? padding;
final Color? fontColor; final Color? fontColor;
final bool? loading; final bool? loading;
@ -32,7 +32,7 @@ class AppButton extends StatefulWidget {
this.iconData, this.iconData,
this.icon, this.icon,
this.color, this.color,
this.fontSize = 16, this.fontSize,
this.padding = 13, this.padding = 13,
this.loading = false, this.loading = false,
this.disabled = false, this.disabled = false,
@ -52,6 +52,9 @@ class AppButton extends StatefulWidget {
class _AppButtonState extends State<AppButton> { class _AppButtonState extends State<AppButton> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
if(widget.fontSize == null) {
widget.fontSize = SizeConfig.getHeightMultiplier() * 1.9;
}
return Container( return Container(
// height: MediaQuery.of(context).size.height * 0.075, // height: MediaQuery.of(context).size.height * 0.075,
height: widget.height, height: widget.height,

Loading…
Cancel
Save