api_manager 0.1.9 api_manager: ^0.1.9 copied to clipboard
A simple package for manage api request easily with the help of flutter dio api.
import 'package:api_manager/api_manager.dart';
void main() async {
ApiManager _apiManager = ApiManager();
_apiManager.options.baseUrl = $base_url;
_apiManager.responseBodyWrapper("data");
ApiResponse<List<dynamic>> response = await _apiManager.request(
requestType: RequestType.GET,
route: $route,
responseBodySerializer: (jsonMap) {
return jsonMap as List;
},
// requestParams: {'access_token': '$access_token'},
);
print(response);
}