change addpatient widget to accept signedin user and arg
This commit is contained in:
parent
cae2ca2320
commit
61658d071e
2 changed files with 3 additions and 3 deletions
|
|
@ -58,7 +58,7 @@ class _AddOrViewPatientState extends State<AddOrViewPatient> {
|
|||
return PatientView(selectedPatient: snapshot.data!);
|
||||
}
|
||||
}
|
||||
return AddPatient(userEmail: widget.signedInUser.email);
|
||||
return AddPatient(signedInUser: widget.signedInUser);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ class RouteGenerator {
|
|||
return _errorRoute();
|
||||
|
||||
case '/patient-manager/add':
|
||||
if (args is String) {
|
||||
if (args is AppUser) {
|
||||
return MaterialPageRoute(
|
||||
builder: (_) => AddPatient(
|
||||
userEmail: args,
|
||||
signedInUser: args,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue