loadUrl method

Future<void> loadUrl({
  1. required URLRequest urlRequest,
})

Implementation

Future<void> loadUrl({required URLRequest urlRequest}) async {
  if ((urlRequest.method == null || urlRequest.method == "GET") &&
      (urlRequest.headers == null || urlRequest.headers!.isEmpty)) {
    iframe.src = urlRequest.url.toString();
  } else {
    iframe.src = _convertHttpResponseToData(await _makeRequest(urlRequest));
  }
}