sendOtp method

Future<StatusResponse> sendOtp()

Send two factor OTP to the user

Implementation

Future<StatusResponse> sendOtp() async {
  try {
    final response = await dio.post("/two-factor/send-otp", options: await super.getOptions());
    return StatusResponse.fromJson(response.data);
  } catch (e) {
    final message = getErrorMessage(e);
    if (message == null) rethrow;
    throw message;
  }
}