setSearchText method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(apiName: 'UIFindInteraction.searchText', apiUrl: 'https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2', note: 'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it will pre-populate the system find panel\'s search text field with a search query.'), MacOSPlatform(), LinuxPlatform(apiName: 'webkit_find_controller_search', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search.html'), WindowsPlatform(apiName: 'ICoreWebView2FindOptions.put_FindTerm', apiUrl: 'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2findoptions')])
- 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
@SupportedPlatforms(
platforms: [
AndroidPlatform(),
IOSPlatform(
apiName: 'UIFindInteraction.searchText',
apiUrl:
'https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2',
note:
'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it will pre-populate the system find panel\'s search text field with a search query.',
),
MacOSPlatform(),
LinuxPlatform(
apiName: 'webkit_find_controller_search',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.search.html',
),
WindowsPlatform(
apiName: 'ICoreWebView2FindOptions.put_FindTerm',
apiUrl:
'https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2findoptions',
),
],
)
Future<void> setSearchText(String? searchText) {
throw UnimplementedError(
'setSearchText is not implemented on the current platform',
);
}