clearMatches method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.clearMatches', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#clearMatches()'), IOSPlatform(note: 'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it uses the built-in find interaction native UI, otherwise this is implemented using CSS and Javascript. In this case, it will use the [Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2)'), MacOSPlatform(), LinuxPlatform(apiName: 'webkit_find_controller_search_finish', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search_finish.html'), WindowsPlatform(apiName: 'ICoreWebView2Find.Stop', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find#stop')])
Clears the highlighting surrounding text matches created by findAll.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.clearMatches)
- iOS WKWebView:
- If InAppWebViewSettings.isFindInteractionEnabled is
true, it uses the built-in find interaction native UI, otherwise this is implemented using CSS and Javascript. In this case, it will use the Official API - UIFindInteraction.dismissFindNavigator
- If InAppWebViewSettings.isFindInteractionEnabled is
- macOS WKWebView
- Linux WPE WebKit (Official API - webkit_find_controller_search_finish)
- Windows WebView2 (Official API - ICoreWebView2Find.Stop)
Use the PlatformFindInteractionController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.clearMatches',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#clearMatches()',
),
IOSPlatform(
note:
'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it uses the built-in find interaction native UI, otherwise this is implemented using CSS and Javascript. In this case, it will use the [Official API - UIFindInteraction.dismissFindNavigator](https://developer.apple.com/documentation/uikit/uifindinteraction/3975827-dismissfindnavigator?changes=_2)',
),
MacOSPlatform(),
LinuxPlatform(
apiName: 'webkit_find_controller_search_finish',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search_finish.html',
),
WindowsPlatform(
apiName: 'ICoreWebView2Find.Stop',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find#stop',
),
],
)
Future<void> clearMatches() {
throw UnimplementedError(
'clearMatches is not implemented on the current platform',
);
}