CorporateSendOtp method
Future
CorporateSendOtp(
{ - dynamic mobile,
- dynamic deviceid,
- dynamic email_id,
- dynamic context,
})
Implementation
Future CorporateSendOtp({mobile, deviceid, email_id, context}) async {
final response = await http.post(
Uri.parse('${SDK_BASE_URL}claim_adminpanel/claim_api/corporate_check'),
body: {
"mobile": mobile,
},
);
var decodedResponse = json.decode(response.body);
if (response.statusCode == 200) {
Fluttertoast.showToast(
msg: decodedResponse['message'],
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 2,
textColor: Colors.white,
fontSize: 16.0);
Get.to(Registration_Verify(
mobNum: mobile, deviceid: deviceid, email: email_id));
} else {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
"${decodedResponse['message']}".trim(),
style: TextStyle(
fontFamily: 'Nunito', fontWeight: FontWeight.w500, fontSize: 14),
)));
}
}