resetPassword method
Reset the password of the user
otp The OTP to reset the password
phoneNumber The phone number to reset the password
newPassword The new password to set
Implementation
Future<StatusResponse> resetPassword({
required String otp,
required String phoneNumber,
required String newPassword,
}) async {
try {
final response = await dio.post(
"/phone-number/reset-password",
data: {"otp": otp, "phoneNumber": phoneNumber, "newPassword": newPassword},
);
return StatusResponse.fromJson(response.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}