patch method

Future<Response> patch(
  1. String path, {
  2. required Map<String, dynamic> data,
  3. APIType apiType = APIType.public,
  4. Map<String, dynamic>? headers,
  5. Map<String, dynamic>? query,
})

Implementation

Future<Response<dynamic>> patch(
  String path, {
  required Map<String, dynamic> data,
  APIType apiType = APIType.public,
  Map<String, dynamic>? headers,
  Map<String, dynamic>? query,
}) async {
  _setDioInterceptorList();

  final standardHeaders = await _getOptions(apiType);
  if (headers != null) {
    standardHeaders.headers?.addAll(headers);
  }

  return _dio
      .patch(
        path,
        data: data,
        options: standardHeaders,
        queryParameters: query,
      )
      .then((value) => value)
      .catchError(_handleException);
}