IPadOSPlatformMenuDelegate class
Custom PlatformMenuDelegate adding support for menus on iOS, specifically for the new iPadOS 26 menu bar.
Use IPadOSPlatformMenuDelegate.create to instantiate this delegate. The factory method ensures proper platform validation and automatically falls back to DefaultPlatformMenuDelegate on non-iOS platforms.
Example:
WidgetsBinding.instance.platformMenuDelegate = IPadOSPlatformMenuDelegate.create();
- Inheritance
-
- Object
- PlatformMenuDelegate
- IPadOSPlatformMenuDelegate
Properties
- channel → MethodChannel
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearMenus(
) → void -
Clears any existing platform-rendered menus and leaves the application
with no menus.
override
-
debugLockDelegate(
BuildContext context) → bool -
This is called by PlatformMenuBar when it is initialized, to be sure that
only one is active at a time.
override
-
debugUnlockDelegate(
BuildContext context) → bool -
This is called by PlatformMenuBar when it is disposed, so that another
one can take over.
override
-
getAvailableDefaultMenus(
) → Future< Map< String, String> ?> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setMenus(
List< PlatformMenuItem> topLevelMenus) → void -
Sets the entire menu hierarchy for a platform-rendered menu bar.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{MethodChannel? channel}) → PlatformMenuDelegate - Creates an instance of IPadOSPlatformMenuDelegate for iOS platforms, or DefaultPlatformMenuDelegate for other platforms.