|
|
|
|
@ -8,16 +8,31 @@ class PatientsList extends StatefulWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class _PatientsListState extends State<PatientsList> {
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
var _isInit =true;
|
|
|
|
|
@override
|
|
|
|
|
void didChangeDependencies() {
|
|
|
|
|
final routeArgs = ModalRoute.of(context).settings.arguments as Map;
|
|
|
|
|
PatientModel patient = routeArgs['patientSearchForm'];
|
|
|
|
|
String patientType = routeArgs['selectedType'];
|
|
|
|
|
print(patientType);
|
|
|
|
|
var list ;
|
|
|
|
|
if(_isInit) {
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
PatientsProvider patientsProv = Provider.of<PatientsProvider>(context);
|
|
|
|
|
patientsProv.getPatientList(patient, patientType);
|
|
|
|
|
patientsProv.getPatientList(patient, patientType).then((res){
|
|
|
|
|
print('Response EEEEEEEE: ${res}');
|
|
|
|
|
print(res['ServiceName']);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
_isInit = false;
|
|
|
|
|
super.didChangeDependencies();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBar(title: Text('PatientsList'),),
|
|
|
|
|
);
|
|
|
|
|
|