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