editPassword method

Future<bool> editPassword(
  1. String oldPassword,
  2. String newPassword,
  3. String confirmNewPassword
)

Implementation

Future<bool> editPassword(
    String oldPassword, String newPassword, String confirmNewPassword) async {
  var req = await HttpRequest().httpRequest(
      HttpIntent("user/change_password", {
        "old_password": oldPassword,
        "new_password": newPassword,
        "confirm_new_password": confirmNewPassword
      }),
      context: context,
      "Aggiorno password...",
      method: HttpMethod.post,
      dialog: dialog);
  if (!elaborateResponse(req)) {
    return false;
  }

  return true;
}