post method

Future<Response> post(
  1. String path, {
  2. dynamic data,
  3. Map<String, dynamic>? queryParameters,
  4. Options? options,
  5. CancelToken? cancelToken,
  6. ProgressCallback? onSendProgress,
  7. ProgressCallback? onReceiveProgress,
})

Implementation

Future<Response> post(
  String path, {
  data,
  Map<String, dynamic>? queryParameters,
  Options? options,
  CancelToken? cancelToken,
  ProgressCallback? onSendProgress,
  ProgressCallback? onReceiveProgress,
}) async {
  dio = Dio()..options.baseUrl = _baseUrl;
  return dio.post(
    path,
    data: data,
    queryParameters: queryParameters,
    options: options,
    cancelToken: cancelToken,
    onSendProgress: onSendProgress,
    onReceiveProgress: onReceiveProgress,
  );
}