addMenuItems method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(note: 'Not available in a Trusted Web Activity.'), IOSPlatform()])
void addMenuItems(
  1. List<ChromeSafariBrowserMenuItem> menuItems
)

Adds a list of ChromeSafariBrowserMenuItem to the menu.

Officially Supported Platforms/Implementations:

  • Android Chrome Custom Tabs:
    • Not available in a Trusted Web Activity.
  • iOS SFSafariViewController

Parameters - Officially Supported Platforms/Implementations:

  • menuItems: all platforms

Use the PlatformChromeSafariBrowser.isMethodSupported method to check if this method is supported at runtime.

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(note: 'Not available in a Trusted Web Activity.'),
    IOSPlatform(),
  ],
)
void addMenuItems(List<ChromeSafariBrowserMenuItem> menuItems) {
  throw UnimplementedError(
    'addMenuItems is not implemented on the current platform',
  );
}