resetPassword static method

Future<Response> resetPassword({
  1. String email = "",
  2. String mobileNo = "",
  3. required String otp,
  4. required String password,
})

Implementation

static Future<Response<dynamic>> resetPassword({
  String email = "",
  String mobileNo = "",
  required String otp,
  required String password,
}) async {
  String url = "${AppUrls.baseUrlVSMS}/subscriberv2/v1/forgotpassword";
  var body = {
    "email": email.isEmpty ? null : email,
    "otp": otp,
    "password": password,
  };

  if (mobileNo.isNotEmpty) {
    body["mobileno"] = mobileNo;
  }

  final response = await _dio!.put(url, data: body);
  return response;
}