postRequest method

Future<Response> postRequest(
  1. String endPoint,
  2. Object? body,
  3. Map<String, String>? headers
)

POST REQUEST */

Implementation

Future<Response> postRequest(String endPoint, Object? body,Map<String, String>? headers) async {
  try {
    var response = await post(Uri.parse(baseUrl + endPoint),
        body: body, headers: headers);
    return response;
  } catch (ex) {
    Log.e(kTag, "--------------- postRequest Exception -------------- ");
    Log.e(kTag, ex);
  }
  return Response("Failure", 0);
}