postInBg method
Sends a POST request in the background.
This method wraps the implementation of the POST request, allowing for asynchronous processing of the request and response.
endPoint
- The API endpoint to which the request is sent.
param
- The parameters to include in the request body.
headers
- The request headers to send with the request.
Returns a Future containing a Map<String, dynamic> that represents the response from the API.
Implementation
@override
/// Sends a POST request in the background.
///
/// This method wraps the implementation of the POST request,
/// allowing for asynchronous processing of the request and response.
///
/// [endPoint] - The API endpoint to which the request is sent.
/// [param] - The parameters to include in the request body.
/// [headers] - The request headers to send with the request.
///
/// Returns a [Future] containing a [Map<String, dynamic>]
/// that represents the response from the API.
Future<Map<String, dynamic>> postInBg(String endPoint,
Map<String, dynamic> param, Map<String, dynamic> headers) async {
return await _postInBg(endPoint, param, headers);
}