getFavicon method
- @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')])
- required WebUri url,
- 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:
- Windows WebView2 (Official API - ICoreWebView2_15.GetFavicon)
Parameters - Officially Supported Platforms/Implementations:
url: all platformsfaviconImageFormat: 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',
);
}