putRequest method

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

PUT REQUEST */

Implementation

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