loginWithOtp static method

dynamic loginWithOtp({
  1. String mobileno = "",
  2. String otp = "",
})

Implementation

static loginWithOtp({String mobileno = "", String otp = ""}) async {
  var devicetype = DeviceInfo.deviceos;
  var deviceos = DeviceInfo.deviceos;

  String url =
      "${AppUrls.baseUrlVSMS}/subscriberv2/v1/login?devicetype=$devicetype&deviceos=$deviceos&mobileno=$mobileno&country=IN";

  if (otp.isNotEmpty) {
    url = "$url&otp=$otp";
  }

  final response = await _dio!.get(url);
  return response;
}