forked from yaso_meth/mih-project
change addpatient widget to accept signedin user and arg
This commit is contained in:
@@ -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,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user