personal profile update
This commit is contained in:
parent
17f0f70ebd
commit
dab3735b11
1 changed files with 3 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue