change arges to cater for selected patient
This commit is contained in:
@@ -56,7 +56,12 @@ class _AddOrViewPatientState extends State<AddOrViewPatient> {
|
||||
if (snapshot.hasData) {
|
||||
// Extracting data from snapshot object
|
||||
//final data = snapshot.data as String;
|
||||
return PatientView(arguments: widget.arguments);
|
||||
return PatientView(
|
||||
arguments: PatientViewArguments(
|
||||
widget.arguments.signedInUser,
|
||||
snapshot.requireData,
|
||||
widget.arguments.type,
|
||||
));
|
||||
}
|
||||
}
|
||||
return AddPatient(signedInUser: widget.arguments.signedInUser);
|
||||
|
||||
@@ -104,8 +104,10 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
||||
Icons.medication,
|
||||
"Patient Profile",
|
||||
() {
|
||||
//comeback here
|
||||
Navigator.of(context).pushNamed('/patient-profile',
|
||||
arguments: PatientViewArguments(widget.signedInUser, "personal"));
|
||||
arguments:
|
||||
PatientViewArguments(widget.signedInUser, null, "personal"));
|
||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
||||
// arguments: widget.userEmail);
|
||||
}
|
||||
@@ -140,8 +142,8 @@ class _HomeTileGridState extends State<HomeTileGrid> {
|
||||
Icons.medication,
|
||||
"Manage Patient",
|
||||
() {
|
||||
Navigator.of(context).pushNamed('/patient-manager',
|
||||
arguments: widget.signedInUser.email);
|
||||
Navigator.of(context)
|
||||
.pushNamed('/patient-manager', arguments: widget.signedInUser);
|
||||
// Navigator.popAndPushNamed(context, '/patient-manager',
|
||||
// arguments: widget.userEmail);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user