CorporateHealthcareEmailVerify method
Future
CorporateHealthcareEmailVerify({
- dynamic context,
- dynamic email,
- dynamic mobile,
- dynamic verifyFor,
Implementation
Future CorporateHealthcareEmailVerify(
{context, email, mobile, verifyFor}) async {
final response = await http.post(
Uri.parse(
'${SDK_BASE_URL}claim_adminpanel/claim_api/package_registration/verify_email'),
body: {
"email_id": '${email}',
"txt_opt_sent_no": '${mobile}',
"verify_for": '${verifyFor}'
},
);
print(response.body);
var decodedResponse = json.decode(response.body);
if (decodedResponse['email_verified'] == 'notfound') {
Get.back();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
"${decodedResponse['message']}".trim(),
style: TextStyle(
fontFamily: 'Nunito',
fontWeight: FontWeight.w500,
fontSize: 14),
),
behavior: SnackBarBehavior.floating));
} else {
Get.back();
Get.to(Corporate_healthCare_verifyotp(
email: email,
emailverify: '${decodedResponse['email_verified']}',
mobNum: mobile,
));
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
"${decodedResponse['message']}".trim(),
style: TextStyle(
fontFamily: 'Nunito',
fontWeight: FontWeight.w500,
fontSize: 14),
),
behavior: SnackBarBehavior.floating));
await CorporateHealthcareSendOTP(
context: context,
email: email,
email_verified: '${decodedResponse['email_verified']}',
mobile: mobile);
}
}