loadUrl method Null safety

Future<void> loadUrl(
  1. String url,
  2. {Map<String, String>? headers}
)

Loads the specified URL.

If headers is not null and the URL is an HTTP URL, the key value paris in headers will be added as key value pairs of HTTP headers for the request.

url must not be null.

Throws an ArgumentError if url is not a valid URL string.

Implementation

Future<void> loadUrl(
  String url, {
  Map<String, String>? headers,
}) async {
  assert(url != null);
  _validateUrlString(url);
  return _webViewPlatformController.loadUrl(url, headers);
}