sendToServer abstract method

Future<void> sendToServer({
  1. required String url,
  2. required String methodType,
  3. Map<String, String>? headers,
  4. Object? body,
  5. Encoding? encoding,
})

Send error reports to a server.

This method sends error reports to a specified url using the given methodType. Additional parameters like headers, body, encoding, and supressCustomErrors can be specified.

url is the target URL for sending error reports.

methodType is the HTTP method type for the request (e.g., 'POST').

headers are optional HTTP headers to include in the request.

body is the request body, which can be of type String or Map.

encoding is the character encoding to use for the request.

Implementation

Future<void> sendToServer({
  required String url,
  required String methodType,
  Map<String, String>? headers,
  Object? body,
  Encoding? encoding,
});