onTitleChanged property

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebChromeClient.onReceivedTitle', apiUrl: 'https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)'), IOSPlatform(), MacOSPlatform(), WebPlatform(), WindowsPlatform(apiName: 'ICoreWebView2.add_DocumentTitleChanged', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_documenttitlechanged'), LinuxPlatform(apiName: 'WebKitWebView::notify::title', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/property.WebView.title.html')])
void Function(T controller, String? title)? onTitleChanged
final

Event fired when a change in the document title occurred.

title represents the string containing the new title of the document.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • title: all platforms

Use the PlatformWebViewCreationParams.isPropertySupported method to check if this property is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'WebChromeClient.onReceivedTitle',
      apiUrl:
          'https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)',
    ),
    IOSPlatform(),
    MacOSPlatform(),
    WebPlatform(),
    WindowsPlatform(
      apiName: 'ICoreWebView2.add_DocumentTitleChanged',
      apiUrl:
          'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.2210.55#add_documenttitlechanged',
    ),
    LinuxPlatform(
      apiName: 'WebKitWebView::notify::title',
      apiUrl:
          'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/property.WebView.title.html',
    ),
  ],
)
final void Function(T controller, String? title)? onTitleChanged;