findString method
- @SupportedPlatforms(platforms: [IOSPlatform(available: '14.0', apiName: 'WKWebView.findString', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3656413-findstring'), MacOSPlatform(available: '11.0', apiName: 'WKWebView.findString', apiUrl: 'https://developer.apple.com/documentation/webkit/wkwebview/3656413-findstring')])
Searches the page for find without presenting the system find UI.
On iOS/macOS this uses WKWebView.findString. A match is selected and
scrolled into view.
Officially Supported Platforms/Implementations:
- iOS WKWebView 14.0+ (Official API - WKWebView.findString)
- macOS WKWebView 11.0+ (Official API - WKWebView.findString)
Parameters - Officially Supported Platforms/Implementations:
find: all platformscaseSensitive: all platformsbackwards: all platformswraps: all platforms
Use the PlatformFindInteractionController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
IOSPlatform(
available: '14.0',
apiName: 'WKWebView.findString',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3656413-findstring',
),
MacOSPlatform(
available: '11.0',
apiName: 'WKWebView.findString',
apiUrl:
'https://developer.apple.com/documentation/webkit/wkwebview/3656413-findstring',
),
],
)
Future<bool> findString({
required String find,
bool caseSensitive = false,
bool backwards = false,
bool wraps = true,
}) {
throw UnimplementedError(
'findString is not implemented on the current platform',
);
}