onPressedChangePassword method

void onPressedChangePassword()

Implementation

void onPressedChangePassword() {
  if(newPassword != newPasswordConfirm) {
    final revised = context.p.reviseChangePasswordStatus(AFSISigninStatus.error, "The new password does not match the confirmation password.");
    context.updateRouteParam(revised);
    return;
  }
  final revised = context.p.reviseChangePasswordStatus(AFSISigninStatus.loading, "Changing password...");
  context.updateRouteParam(revised);

  // validate the users signin
  final lpi = context.accessLPI<AFSISigninActionsLPI>(AFSILibraryProgrammingInterfaceID.signinActions);
  lpi.onChangePassword(currentPasswordForPassword, newPassword);
}