callWithDeviceInfo method
Future
callWithDeviceInfo(
- String data,
- BuildContext? context,
- String url, {
- Function? noNetworkCallBack,
- String? deviceInfo,
- dynamic sessionExpiredCallback()?,
Implementation
Future<dynamic> callWithDeviceInfo(
String data, BuildContext? context, String url,
{Function? noNetworkCallBack,
String? deviceInfo,
Function(BuildContext)? sessionExpiredCallback}) async {
log(url, name: "Api Url");
var headers = {
"Content-Type": 'application/json',
"devicedetails": deviceInfo
};
return _netUtil
.post(context, url,
body: data,
headers: headers,
noNetworkCallBack: noNetworkCallBack,
sessionExpiredCallback: sessionExpiredCallback)
.then((dynamic res) {
return _decoder.convert(res.toString());
});
}