MihFloatingMenu class
A customized floating action button that expands into a menu of sub-actions.
The MihFloatingMenu uses a "Speed Dial" pattern to present multiple actions to the user in a space-efficient manner. It features:
- Automatic Color Transition: Changes from MihColors.green to MihColors.red when toggled open.
- Flexible Iconography: Supports both static IconData and AnimatedIconData.
- Themed Overlay: Applies a semi-transparent dark overlay to the background when active to focus user attention on the menu.
Example:
MihFloatingMenu(
icon: Icons.add,
children: [
SpeedDialChild(
child: Icon(Icons.share),
label: 'Share',
onTap: () => print('Share tapped'),
),
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- MihFloatingMenu
Constructors
-
MihFloatingMenu({Key? key, IconData? icon, double? iconSize, AnimatedIconData? animatedIcon, SpeedDialDirection? direction, bool? darkMode, required List<
SpeedDialChild> children}) -
const
Properties
- animatedIcon → AnimatedIconData?
-
An optional animated icon (e.g., menu to close) to use for the button.
final
-
children
→ List<
SpeedDialChild> -
The list of
SpeedDialChildwidgets to display when the menu is expanded.final - darkMode → bool?
-
Whether to use Dark Mode styling for the component colors.
final
- direction → SpeedDialDirection?
-
The direction in which the menu children will expand.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
The static icon to display when the menu is closed.
final
- iconSize → double?
-
The size of the floating action button. Defaults to 56.0.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< MihFloatingMenu> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited