resetPassword function
- String email
Reset password with email
Implementation
Future<bool> resetPassword(String email) async {
try {
var response = await http.post(passwordResetApi,
body: json.encode({
AppConstants.EMAIL: email,
AppConstants.REQUEST_TYPE: "PASSWORD_RESET"
}));
if (response.statusCode == 200) {
return true;
}
return false;
} catch (err) {
throw err;
}
}