forgotPasswordByEmail method

Future<ResponseModel> forgotPasswordByEmail(
  1. EmailInput body
)

Forgot password by email

Implementation

Future<ResponseModel> forgotPasswordByEmail(EmailInput body) async {
  try {
    String url = '$baseUrl/email/forgot-password';
    Response? response = await postx(url, body: json.encode(body));
    ResponseModel data =
        ResponseModel.fromJson(json.decode(response.toString()));
    return Future.value(data);
  } catch (e) {
    return Future.error(e);
  }
}