changePassword method
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<ChangePasswordResponse>. 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> changePassword(
PasswordRequestModel passwordRequestModel,
) =>
_apiClient
.changePassword(passwordRequestModel.toJson())
.catchError((error) {
_crashlytics?.recordError(error, StackTrace.current);
throw error;
});