httpGet method

Future<Response> httpGet({
  1. String? url,
  2. String headers = "application/json",
})

Implementation

Future<http.Response> httpGet({
  String? url,
  String headers = "application/json",
}) async {
  var response = await http.get(Uri.parse(url!), headers: {
    HttpHeaders.contentTypeHeader: headers,
  });
  return response;
}