forked from yaso_meth/mih-project
personal profile update
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user