defaultLoader function Null safety

Future<HttpClientResponse> defaultLoader(
  1. String url
)

Implementation

Future<HttpClientResponse> defaultLoader(String url) async {
  final Uri uri = Uri.parse(url);
  var httpClient = HttpClient();

  HttpClientRequest request = await httpClient.getUrl(uri);
  return await request.close();
}