getFavicon method

  1. @SupportedPlatforms.new(platforms: [WindowsPlatform(apiName: 'ICoreWebView2_15.GetFavicon', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2_15?view=webview2-1.0.2849.39#getfavicon')])
Future<Uint8List?> getFavicon({
  1. required WebUri url,
  2. FaviconImageFormat faviconImageFormat = FaviconImageFormat.PNG,
})

Gets the favicon bytes for the given favicon url.

faviconImageFormat specifies the favicon image format to return.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • url: all platforms
  • faviconImageFormat: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    WindowsPlatform(
      apiName: 'ICoreWebView2_15.GetFavicon',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2_15?view=webview2-1.0.2849.39#getfavicon',
    ),
  ],
)
Future<Uint8List?> getFavicon({
  required WebUri url,
  FaviconImageFormat faviconImageFormat = FaviconImageFormat.PNG,
}) {
  throw UnimplementedError(
    '${PlatformInAppWebViewControllerMethod.getFavicon.name} is not implemented on the current platform',
  );
}