nj_api_service 0.0.1
nj_api_service: ^0.0.1 copied to clipboard
Flutter package to make API calls
Usage #
static Future<YourApiResponse?> yourApi(Map<String, dynamic> request) async {
final response = await ApiService.makeRequest(
'https://yourapiurl.com/endpoint', RequestType.get, request, headers);
Map<String, dynamic> jsonMap = ApiService.getResponse(response);
return YourApiResponse.fromJson(jsonMap);
}