setSearchText method
- String? searchText
Pre-populate the search text to be used.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView (Official API - UIFindInteraction.searchText):
- If InAppWebViewSettings.isFindInteractionEnabled is
true, it will pre-populate the system find panel's search text field with a search query.
- If InAppWebViewSettings.isFindInteractionEnabled is
- macOS WKWebView
- Linux WPE WebKit (Official API - webkit_find_controller_search)
- Windows WebView2 (Official API - ICoreWebView2FindOptions.put_FindTerm)
Parameters - Officially Supported Platforms/Implementations:
searchText: all platforms
Use the PlatformFindInteractionController.isMethodSupported method to check if this method is supported at runtime.
Implementation
Future<void> setSearchText(String? searchText) =>
platform.setSearchText(searchText);