verifyPincode method
Future
verifyPincode(
{ - dynamic pincode,
- dynamic context,
})
Implementation
Future verifyPincode({
pincode,
context,
}) async {
final response = await http.get(
Uri.parse(
'${WELLNESS_URL}api/medicine/city/serviceable?pincode=$pincode'),
headers: {'Authorization': currentUserToken},
);
var decodedResponse = json.decode(response.body);
Get.back();
getStateCity = decodedResponse;
if (decodedResponse['success'] == true) {
Validator().successMessage(
context: context, message: "${decodedResponse['message']}");
} else {
Validator().errorMessage(
context: context, message: "${decodedResponse['message']}");
}
}