onFindResultReceived property
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.FindListener.onFindResultReceived', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView.FindListener#onFindResultReceived(int,%20int,%20boolean)'), IOSPlatform(note: 'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, this event will not be called.'), MacOSPlatform(), LinuxPlatform(apiName: 'WebKitFindController::counted-matches', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.FindController.counted-matches.html'), WindowsPlatform(apiName: 'ICoreWebView2Find.ActiveMatchIndexChanged/MatchCountChanged', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find')])
final
Event fired as find-on-page operations progress.
The listener may be notified multiple times while the operation is underway, and the numberOfMatches value should not be considered final unless isDoneCounting is true.
activeMatchOrdinal represents the zero-based ordinal of the currently selected match.
numberOfMatches represents how many matches have been found.
isDoneCounting whether the find operation has actually completed.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.FindListener.onFindResultReceived)
- iOS WKWebView:
- If InAppWebViewSettings.isFindInteractionEnabled is
true, this event will not be called.
- If InAppWebViewSettings.isFindInteractionEnabled is
- macOS WKWebView
- Linux WPE WebKit (Official API - WebKitFindController::counted-matches)
- Windows WebView2 (Official API - ICoreWebView2Find.ActiveMatchIndexChanged/MatchCountChanged)
Parameters - Officially Supported Platforms/Implementations:
controller: all platformsactiveMatchOrdinal: all platformsnumberOfMatches: all platformsisDoneCounting: all platforms
Use the PlatformFindInteractionControllerCreationParams.isPropertySupported method to check if this property is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.FindListener.onFindResultReceived',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView.FindListener#onFindResultReceived(int,%20int,%20boolean)',
),
IOSPlatform(
note:
'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, this event will not be called.',
),
MacOSPlatform(),
LinuxPlatform(
apiName: 'WebKitFindController::counted-matches',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/signal.FindController.counted-matches.html',
),
WindowsPlatform(
apiName: 'ICoreWebView2Find.ActiveMatchIndexChanged/MatchCountChanged',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find',
),
],
)
final void Function(
PlatformFindInteractionController controller,
int activeMatchOrdinal,
int numberOfMatches,
bool isDoneCounting,
)?
onFindResultReceived;