enabled property

bool? enabled

Used to disable an item when a shortcutActivator is used to trigger an action. It also can be used with an intent or onPressed callback, but it's not the only option in this case: an item is disabled when intent, onPressed and shortcutActivator are all null.

Items with submenus cannot be disabled. Also items with no intent, onPressed, shortcutActivator or submenu cannot be enabled by this flag.


final bool? enabled;