MaterialFabMenuModel class

View model for MaterialFabMenu.

The primary use case of this view model is to expose an interface for a parent component to change the visibility of the menu popup without using a @ViewChild directive. This is due to popup visibility being dependent on whether a sub-menu is actually available.

Constructors

MaterialFabMenuModel(MenuItem menuItem, {bool showPopup = false})

Properties

ariaLabel String
no setter
glyph String
Name of glyph displayed within FAB circle.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasIcons bool
True if the FAB has a menu and at least one menu item has an icon.
no setter
hasMenu bool
True if the menuItem exists and has at least one item.
no setter
isFabEnabled bool
True if FAB is in an enabled state - can be clicked and triggered.
no setter
isFabHidden bool
no setter
Menu item model used to render the FAB and its sub-menus.
final
onShowPopupChange Stream<Change<bool?>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showPopup bool
True if the FAB menu should be shown.
no setter
tooltip String
no setter

Methods

closePopup() → void
Close the sub-menu, if it is open.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
trigger(Event event) → void
If the FAB has a sub-menu, then open the sub-menu popup, otherwise only trigger the action callback on the FAB menu item model.

Operators

operator ==(Object other) bool
The equality operator.
inherited