setSearchText method

  1. @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')])
Future<void> setSearchText(
  1. String? searchText
)

Pre-populate the search text to be used.

Officially Supported Platforms/Implementations:

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',
  );
}