BubbleMenuItem class

A single entry of the default bubble context menu.

Provide either a label (optionally with an icon) or a fully custom child.

Constructors

BubbleMenuItem({String? label, Widget? icon, Widget? child, BubbleMenuItemCallback? onSelected, bool enabled = true, TextStyle? textStyle, double height = kMinInteractiveDimension, EdgeInsets? padding})
Creates a menu entry.
const

Properties

child → Widget?
Fully custom content. Takes precedence over label and icon.
final
enabled → bool
Whether the entry can be chosen.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height of the entry.
final
icon → Widget?
Optional leading widget shown before label.
final
label → String?
Text of the entry. Ignored when child is set.
final
onSelected → BubbleMenuItemCallback?
Called after the menu closes and this entry was chosen.
final
padding → EdgeInsets?
Padding of the entry.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textStyle → TextStyle?
Text style applied to label.
final

Methods

buildContent(BuildContext context) → Widget
Builds the widget shown inside the popup menu entry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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