addMenuItem method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(note: 'Not available in a Trusted Web Activity.'), IOSPlatform()])
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
@SupportedPlatforms(
platforms: [
AndroidPlatform(note: 'Not available in a Trusted Web Activity.'),
IOSPlatform(),
],
)
void addMenuItem(ChromeSafariBrowserMenuItem menuItem) {
throw UnimplementedError(
'addMenuItem is not implemented on the current platform',
);
}