getSearchText method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(), IOSPlatform(apiName: 'UIFindInteraction.getSearchText', apiUrl: 'https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2', note: 'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it will get the system find panel\'s search text field value.'), MacOSPlatform(), LinuxPlatform(apiName: 'webkit_find_controller_get_search_text', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.get_search_text.html'), WindowsPlatform()])
Get the search text used.
Officially Supported Platforms/Implementations:
- Android WebView
- iOS WKWebView (Official API - UIFindInteraction.getSearchText):
- If InAppWebViewSettings.isFindInteractionEnabled is
true, it will get the system find panel's search text field value.
- If InAppWebViewSettings.isFindInteractionEnabled is
- macOS WKWebView
- Linux WPE WebKit (Official API - webkit_find_controller_get_search_text)
- Windows WebView2
Use the PlatformFindInteractionController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(),
IOSPlatform(
apiName: 'UIFindInteraction.getSearchText',
apiUrl:
'https://developer.apple.com/documentation/uikit/uifindinteraction/3975834-searchtext?changes=_2',
note:
'If [InAppWebViewSettings.isFindInteractionEnabled] is `true`, it will get the system find panel\'s search text field value.',
),
MacOSPlatform(),
LinuxPlatform(
apiName: 'webkit_find_controller_get_search_text',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.FindController.get_search_text.html',
),
WindowsPlatform(),
],
)
Future<String?> getSearchText() {
throw UnimplementedError(
'getSearchText is not implemented on the current platform',
);
}