fix in patient issues

merge-requests/831/head
Elham Rababh 4 years ago
parent ca3dddd581
commit 99868a058c

@ -1,5 +1,7 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
import 'package:doctor_app_flutter/core/viewModel/PatientSearchViewModel.dart';
import 'package:doctor_app_flutter/icons_app/doctor_app_icons.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
@ -37,7 +39,6 @@ class _InPatientListPageState extends State<InPatientListPage> {
super.dispose();
}
@override
Widget build(BuildContext context) {
return AppScaffold(
@ -209,50 +210,100 @@ class _InPatientListPageState extends State<InPatientListPage> {
height: 0,
)
: Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.grey, width: 0.5),
color: Colors.white,
),
height: MediaQuery.of(context).size.height * 0.5,
color: Colors.white,
child: ListView.builder(
itemCount:
widget.patientSearchViewModel.InpatientClinicList.length,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
setState(() {
isAllClinic = false;
showBottomSheet = false;
selectedClinicName = widget.patientSearchViewModel
.InpatientClinicList[index];
});
widget.patientSearchViewModel.filterByClinic(
clinicName: widget.patientSearchViewModel
.InpatientClinicList[index]);
},
child: Row(
children: [
Radio(
value: widget.patientSearchViewModel
.InpatientClinicList[index],
groupValue: selectedClinicName,
onChanged: (value) {
padding: EdgeInsets.only(top: 13, left: 10, right: 10),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
InkWell(
onTap: () {
setState(() {
showBottomSheet = false;
});
},
child: Icon(DoctorApp.close_1,
size: SizeConfig.getTextMultiplierBasedOnWidth() *
4.5,
color: Color(0xFF2B353E)))
],
),
Row(
children: [
AppText(
"Select Clinic :",
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
fontSize: 18,
),
],
),
SizedBox(
height: 10,
),
Expanded(
child: ListView.builder(
itemCount: widget
.patientSearchViewModel.InpatientClinicList.length,
scrollDirection: Axis.vertical,
physics: ScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
setState(() {
setState(() {
isAllClinic = false;
showBottomSheet = false;
});
widget.patientSearchViewModel
.filterByClinic(clinicName: value);
isAllClinic = false;
showBottomSheet = false;
selectedClinicName = widget
.patientSearchViewModel
.InpatientClinicList[index];
});
widget.patientSearchViewModel.filterByClinic(
clinicName: widget.patientSearchViewModel
.InpatientClinicList[index]);
},
activeColor: Colors.red,
),
AppText(widget.patientSearchViewModel
.InpatientClinicList[index]),
],
));
}),
child: Row(
children: [
Radio(
value: widget.patientSearchViewModel
.InpatientClinicList[index],
groupValue: selectedClinicName,
onChanged: (value) {
setState(() {
setState(() {
isAllClinic = false;
showBottomSheet = false;
selectedClinicName = widget
.patientSearchViewModel
.InpatientClinicList[index];
});
widget.patientSearchViewModel
.filterByClinic(clinicName: value);
});
},
activeColor: Colors.red,
),
AppText(
widget.patientSearchViewModel
.InpatientClinicList[index],
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
fontSize: 15,
),
],
));
}),
),
SizedBox(
height: 20,
),
],
),
),
);
}

@ -64,44 +64,6 @@ class ListOfAllInPatient extends StatelessWidget {
});
},
);
// else if (widget.patientSearchViewModel
// .filteredInPatientItems[index].doctorId ==
// widget.patientSearchViewModel.doctorProfile.doctorID &&
// widget.isMyInPatient)
// return PatientCard(
// patientInfo: widget
// .patientSearchViewModel.filteredInPatientItems[index],
// patientType: "1",
// arrivalType: "1",
// isInpatient: true,
// isMyPatient: widget.patientSearchViewModel
// .filteredInPatientItems[index].doctorId ==
// widget.patientSearchViewModel.doctorProfile.doctorID,
// onTap: () {
// FocusScopeNode currentFocus = FocusScope.of(context);
// if (!currentFocus.hasPrimaryFocus) {
// currentFocus.unfocus();
// }
//
// Navigator.of(context)
// .pushNamed(PATIENTS_PROFILE, arguments: {
// "patient": widget.patientSearchViewModel
// .filteredInPatientItems[index],
// "patientType": "1",
// "from": "0",
// "to": "0",
// "isSearch": false,
// "isInpatient": true,
// "arrivalType": "1",
// "isMyPatient": widget.patientSearchViewModel
// .filteredInPatientItems[index].doctorId ==
// widget
// .patientSearchViewModel.doctorProfile.doctorID,
// });
// },
// );
// else
// return SizedBox();
}),
onNotification: (notification) {
if (isAllClinic && !hasQuery) if (notification

@ -44,7 +44,7 @@ class ListOfMyInpatient extends StatelessWidget {
Navigator.of(context)
.pushNamed(PATIENTS_PROFILE, arguments: {
"patient":
patientSearchViewModel.filteredInPatientItems[index],
patientSearchViewModel.filteredMyInPatientItems[index],
"patientType": "1",
"from": "0",
"to": "0",
@ -57,16 +57,6 @@ class ListOfMyInpatient extends StatelessWidget {
);
}),
onNotification: (t) {
if (isAllClinic && !hasQuery) if (t is ScrollUpdateNotification) {
//TODO Elham*
// if (t.metrics.pixels >= t.metrics.maxScrollExtent - 50) {
// patientSearchViewModel.addOnFilteredList();
// }
//
// if (t.metrics.pixels <= t.metrics.minScrollExtent - 50) {
// patientSearchViewModel.removeOnFilteredList();
// }
}
return;
},
),

@ -692,7 +692,7 @@ packages:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.4"
version: "1.3.0-nullsafety.3"
mime:
dependency: transitive
description:
@ -1026,7 +1026,7 @@ packages:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.2"
version: "1.10.0-nullsafety.1"
sticky_headers:
dependency: "direct main"
description:
@ -1231,5 +1231,5 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.2 <=2.11.0-213.1.beta"
dart: ">=2.10.2 <2.11.0"
flutter: ">=1.22.2 <2.0.0"

Loading…
Cancel
Save