personal profile update

This commit is contained in:
2024-07-25 14:52:54 +02:00
parent 17f0f70ebd
commit dab3735b11

View File

@@ -46,7 +46,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
//print(futureDocOfficeId.toString());
//print("Here3");
var response = await http.put(
Uri.parse("${AppEnviroment.baseApiUrl}/"),
Uri.parse("${AppEnviroment.baseApiUrl}/user/update/"),
headers: <String, String>{
"Content-Type": "application/json; charset=UTF-8"
},
@@ -60,8 +60,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
//print("Here4");
//print(response.statusCode);
if (response.statusCode == 200) {
Navigator.of(context)
.pushNamed('/profile', arguments: widget.signedInUser);
Navigator.of(context).pushNamed('/', arguments: widget.signedInUser);
String message =
"${widget.signedInUser.email}'s information has been updated successfully!";
successPopUp(message);
@@ -143,6 +142,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
textColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
onTap: () {
if (isFieldsFilled()) {
updateUserApiCall();
} else {
showDialog(
context: context,