addMenuItem method

void addMenuItem(
  1. ChromeSafariBrowserMenuItem menuItem
)

Adds a 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:

  • menuItem: all platforms

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

Implementation

void addMenuItem(ChromeSafariBrowserMenuItem menuItem) =>
    platform.addMenuItem(menuItem);