postInBg abstract method
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 aMap<String, dynamic>
representing the server's response.
Implementation
Future<Map<String, dynamic>> postInBg(String endPoint,
Map<String, dynamic> param, Map<String, dynamic> headers);