callWithDeviceInfo method

Future callWithDeviceInfo(
  1. String data,
  2. BuildContext? context,
  3. String url, {
  4. Function? noNetworkCallBack,
  5. String? deviceInfo,
  6. dynamic sessionExpiredCallback(
    1. BuildContext
    )?,
})

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());
  });
}