getInBg abstract method
Sends a GET request in the background to the specified endpoint.
This method is used to fetch data from an API.
Parameters:
endPoint
: The API endpoint from which data will be fetched.headers
: A map of headers to include in the request.
Returns:
- A
Future
that resolves to aMap<String, dynamic>
representing the server's response.
Implementation
Future<Map<String, dynamic>> getInBg(
String endPoint, Map<String, dynamic> headers);