postInBg abstract method

Future<Map<String, dynamic>> postInBg(
  1. String endPoint,
  2. Map<String, dynamic> param,
  3. Map<String, dynamic> headers
)

Sends a POST request in the background with the given parameters and headers.

This method is designed to send JSON-encoded data to the specified endpoint.

Parameters:

  • endPoint: The API endpoint to which the request will be sent.
  • param: A map containing key-value pairs to be sent as the request body.
  • headers: A map of headers to include in the request (e.g., authorization tokens).

Returns:

  • A Future that resolves to a Map<String, dynamic> representing the server's response.

Implementation

Future<Map<String, dynamic>> postInBg(String endPoint,
    Map<String, dynamic> param, Map<String, dynamic> headers);