findNext method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.findNext', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#findNext(boolean)'), 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.findNext](https://developer.apple.com/documentation/uikit/uifindinteraction/3975829-findnext?changes=_2) and ([Official API - UIFindInteraction.findPrevious](https://developer.apple.com/documentation/uikit/uifindinteraction/3975830-findprevious?changes=_2)'), MacOSPlatform(), LinuxPlatform(apiName: 'webkit_find_controller_search_next', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search_next.html'), WindowsPlatform(apiName: 'ICoreWebView2Find.FindNext/FindPrevious', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find#findnext')])
- bool forward = true,
Highlights and scrolls to the next match found by findAll. Notifies PlatformFindInteractionController.onFindResultReceived listener.
forward represents the direction to search. The default value is true, meaning forward.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - WebView.findNext)
- 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.findNext and (Official API - UIFindInteraction.findPrevious
- If InAppWebViewSettings.isFindInteractionEnabled is
- macOS WKWebView
- Linux WPE WebKit (Official API - webkit_find_controller_search_next)
- Windows WebView2 (Official API - ICoreWebView2Find.FindNext/FindPrevious)
Parameters - Officially Supported Platforms/Implementations:
forward: all platforms
Use the PlatformFindInteractionController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.findNext',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#findNext(boolean)',
),
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.findNext](https://developer.apple.com/documentation/uikit/uifindinteraction/3975829-findnext?changes=_2) and ([Official API - UIFindInteraction.findPrevious](https://developer.apple.com/documentation/uikit/uifindinteraction/3975830-findprevious?changes=_2)',
),
MacOSPlatform(),
LinuxPlatform(
apiName: 'webkit_find_controller_search_next',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search_next.html',
),
WindowsPlatform(
apiName: 'ICoreWebView2Find.FindNext/FindPrevious',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2find#findnext',
),
],
)
Future<void> findNext({bool forward = true}) {
throw UnimplementedError(
'findNext is not implemented on the current platform',
);
}