changePasswordMobile method

Future<ChangePasswordResponse> changePasswordMobile(
  1. PasswordRequestModel passwordRequestModel
)

Attempts to change the password of a user.

This function sends a request to the API client with the provided PasswordRequestModel. If the password change is successful, it returns a Future<void>. In case of an error, the error is recorded in Crashlytics and the error is rethrown.

passwordRequestModel The PasswordRequestModel containing the user's information.

Implementation

Future<ChangePasswordResponse> changePasswordMobile(
  PasswordRequestModel passwordRequestModel,
) =>
    _apiClient
        .changePasswordMobile(passwordRequestModel.toJson())
        .catchError((error) {
      _crashlytics?.recordError(error, StackTrace.current);
      throw error;
    });