change addpatient widget to accept signedin user and arg

This commit is contained in:
2024-07-26 13:07:28 +02:00
parent cae2ca2320
commit 61658d071e
2 changed files with 3 additions and 3 deletions

View File

@@ -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);
},
);
}

View File

@@ -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,
),
);
}