import 'package:tangheem/classes/consts.dart'; import 'package:tangheem/models/general_response_model.dart'; import 'api_client.dart'; class UserApiClient { static final UserApiClient _instance = UserApiClient._internal(); UserApiClient._internal(); factory UserApiClient() => _instance; Future forgotPassword(String _email) async { String url = "${ApiConsts.user}ForgotPassword"; var postParams = {"email": _email}; return await ApiClient().postJsonForObject((json) => GeneralResponseModel.fromJson(json), url, postParams); } Future verifyOTP(String _email, int _otp) async { String url = "${ApiConsts.user}OTPVerification"; var postParams = {"email": _email, "opt": _otp}; return await ApiClient().postJsonForObject((json) => GeneralResponseModel.fromJson(json), url, postParams); } Future updatePassword(String _email, int _otp, String _password) async { String url = "${ApiConsts.user}UpdatePassword"; var postParams = {"email": _email, "opt": _otp, "newPassword": _password, "confirmPassword": _password}; return await ApiClient().postJsonForObject((json) => GeneralResponseModel.fromJson(json), url, postParams); } }