prerenderUrl method

  1. @SupportedPlatforms(platforms: [AndroidPlatform(apiName: 'WebViewCompat.prerenderUrlAsync', apiUrl: 'https://developer.android.com/reference/androidx/webkit/WebViewCompat#prerenderUrlAsync(android.webkit.WebView,java.lang.String,java.util.concurrent.Executor,androidx.webkit.PrerenderOperationCallback)', note: 'Requires [WebViewFeature.PRERENDER_URL].')])
Future<void> prerenderUrl({
  1. required WebUri url,
})

Speculatively prerenders url in this WebView.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebViewCompat.prerenderUrlAsync',
      apiUrl:
          'https://developer.android.com/reference/androidx/webkit/WebViewCompat#prerenderUrlAsync(android.webkit.WebView,java.lang.String,java.util.concurrent.Executor,androidx.webkit.PrerenderOperationCallback)',
      note: 'Requires [WebViewFeature.PRERENDER_URL].',
    ),
  ],
)
Future<void> prerenderUrl({required WebUri url}) {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.prerenderUrl.name} is not implemented on the current platform',
  );
}