onPressed property

ToolbarItemCallback? onPressed

Executed when this item is pressed.

If ToolbarItem.sublist is used, this will push the sublist to the stack of toolbar item lists and it will be shown on top of the toolbar this item is a part of.

Implementation

ToolbarItemCallback? get onPressed =>
    hasItems ? ((context, _) => super.sublistCallback(context)) : _onPressed;