WellnessSupportRequest method
dynamic
WellnessSupportRequest({
- dynamic usermobnum,
- dynamic requestType,
- dynamic name,
- dynamic mobile,
- dynamic email,
- dynamic message,
- dynamic context,
Implementation
WellnessSupportRequest(
{usermobnum, requestType, name, mobile, email, message, context}) async {
var decodedResponse;
final apibody = {
"support_request_no": usermobnum.toString(),
"support_request_type": requestType.toString(),
"name": name.toString(),
"mobile": mobile.toString(),
"email": email.toString(),
"message": message.toString(),
};
try {
http.Response response = await http.post(
Uri.parse('${SDK_BASE_URL}wellness_api/request_support'),
body: apibody);
decodedResponse = json.decode(response.body);
if (decodedResponse['status'] == 200) {
Get.offAll(HomePage());
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return PinCodePopUp(
messag: "${decodedResponse['message']}",
image: '${LottiePath}Upload_Successful.json',
);
});
}
} catch (e) {
errorListner(
apiname: 'wellness_api/request_support',
responsed: "${decodedResponse}",
request: '${apibody}',
app_error: '${e}');
}
}