callApiGet static method
Implementation
static Future<http.Response> callApiGet(String route, data, {String token = ''}) async {
Map<String, String> headers = {};
headers['Content-Type'] = 'application/json';
if(token.isNotEmpty){
headers['Authorization'] = 'Bearer $token';
}
return http.get(
Uri.parse('$apiUrl$route'),
headers: headers,
);
}