M3ESplitButton<T> class

Material 3 Expressive Split Button.

Inheritance

Constructors

M3ESplitButton({Key? key, required List<M3ESplitButtonItem<T>>? items, ValueChanged<T>? onSelected, VoidCallback? onPressed, String? label, IconData? leadingIcon, M3EButtonSize size = M3EButtonSize.sm, M3EButtonShape shape = M3EButtonShape.round, M3EButtonStyle style = M3EButtonStyle.filled, M3ESplitButtonTrailingAlignment trailingAlignment = M3ESplitButtonTrailingAlignment.opticalCenter, String? leadingTooltip, String? trailingTooltip, bool enabled = true, List<PopupMenuEntry<T>> menuBuilder(BuildContext)?, List<M3EMenuNode> m3eMenuBuilder(BuildContext)?, M3ESplitButtonDecoration? decoration, MouseCursor? mouseCursor, WidgetStatesController? statesController, FocusNode? focusNode, bool autofocus = false, ValueChanged<bool>? onFocusChange, T? selectedValue, void onMultiSelected(Set<T>)?, VoidCallback? onLongPress, ValueChanged<bool>? onHover, bool enableFeedback = _kDefaultEnableFeedback, InteractiveInkFeatureFactory? splashFactory})
const.
const
M3ESplitButton.elevated({Key? key, required List<M3ESplitButtonItem<T>>? items, ValueChanged<T>? onSelected, VoidCallback? onPressed, String? label, IconData? leadingIcon, M3EButtonSize size = M3EButtonSize.sm, M3EButtonShape shape = M3EButtonShape.round, M3ESplitButtonTrailingAlignment trailingAlignment = M3ESplitButtonTrailingAlignment.opticalCenter, String? leadingTooltip, String? trailingTooltip, bool enabled = true, List<PopupMenuEntry<T>> menuBuilder(BuildContext)?, List<M3EMenuNode> m3eMenuBuilder(BuildContext)?, M3ESplitButtonDecoration? decoration, MouseCursor? mouseCursor, WidgetStatesController? statesController, FocusNode? focusNode, bool autofocus = false, ValueChanged<bool>? onFocusChange, T? selectedValue, void onMultiSelected(Set<T>)?, VoidCallback? onLongPress, ValueChanged<bool>? onHover, bool enableFeedback = _kDefaultEnableFeedback, InteractiveInkFeatureFactory? splashFactory})
An elevated split button (medium emphasis with a shadow).
const
M3ESplitButton.filled({Key? key, required List<M3ESplitButtonItem<T>>? items, ValueChanged<T>? onSelected, VoidCallback? onPressed, String? label, IconData? leadingIcon, M3EButtonSize size = M3EButtonSize.sm, M3EButtonShape shape = M3EButtonShape.round, M3ESplitButtonTrailingAlignment trailingAlignment = M3ESplitButtonTrailingAlignment.opticalCenter, String? leadingTooltip, String? trailingTooltip, bool enabled = true, List<PopupMenuEntry<T>> menuBuilder(BuildContext)?, List<M3EMenuNode> m3eMenuBuilder(BuildContext)?, M3ESplitButtonDecoration? decoration, MouseCursor? mouseCursor, WidgetStatesController? statesController, FocusNode? focusNode, bool autofocus = false, ValueChanged<bool>? onFocusChange, T? selectedValue, void onMultiSelected(Set<T>)?, VoidCallback? onLongPress, ValueChanged<bool>? onHover, bool enableFeedback = _kDefaultEnableFeedback, InteractiveInkFeatureFactory? splashFactory})
A filled split button (highest emphasis).
const
M3ESplitButton.outlined({Key? key, required List<M3ESplitButtonItem<T>>? items, ValueChanged<T>? onSelected, VoidCallback? onPressed, String? label, IconData? leadingIcon, M3EButtonSize size = M3EButtonSize.sm, M3EButtonShape shape = M3EButtonShape.round, M3ESplitButtonTrailingAlignment trailingAlignment = M3ESplitButtonTrailingAlignment.opticalCenter, String? leadingTooltip, String? trailingTooltip, bool enabled = true, List<PopupMenuEntry<T>> menuBuilder(BuildContext)?, List<M3EMenuNode> m3eMenuBuilder(BuildContext)?, M3ESplitButtonDecoration? decoration, MouseCursor? mouseCursor, WidgetStatesController? statesController, FocusNode? focusNode, bool autofocus = false, ValueChanged<bool>? onFocusChange, T? selectedValue, void onMultiSelected(Set<T>)?, VoidCallback? onLongPress, ValueChanged<bool>? onHover, bool enableFeedback = _kDefaultEnableFeedback, InteractiveInkFeatureFactory? splashFactory})
An outlined split button (medium emphasis with a border).
const
M3ESplitButton.tonal({Key? key, required List<M3ESplitButtonItem<T>>? items, ValueChanged<T>? onSelected, VoidCallback? onPressed, String? label, IconData? leadingIcon, M3EButtonSize size = M3EButtonSize.sm, M3EButtonShape shape = M3EButtonShape.round, M3ESplitButtonTrailingAlignment trailingAlignment = M3ESplitButtonTrailingAlignment.opticalCenter, String? leadingTooltip, String? trailingTooltip, bool enabled = true, List<PopupMenuEntry<T>> menuBuilder(BuildContext)?, List<M3EMenuNode> m3eMenuBuilder(BuildContext)?, M3ESplitButtonDecoration? decoration, MouseCursor? mouseCursor, WidgetStatesController? statesController, FocusNode? focusNode, bool autofocus = false, ValueChanged<bool>? onFocusChange, T? selectedValue, void onMultiSelected(Set<T>)?, VoidCallback? onLongPress, ValueChanged<bool>? onHover, bool enableFeedback = _kDefaultEnableFeedback, InteractiveInkFeatureFactory? splashFactory})
A tonal split button (medium emphasis).
const

Properties

autofocus → bool
final.
final
decoration → M3ESplitButtonDecoration?
final.
final
decorationAnimationDuration → Duration
Duration. Zero keeps the segment clip on the spring, not Material's tween.
no setter
decorationBackgroundColor → WidgetStateProperty<Color?>?
WidgetStateProperty.
no setter
decorationBorderRadius → double?
double.
no setter
decorationBorderSide → WidgetStateProperty<BorderSide?>?
WidgetStateProperty.
no setter
decorationForegroundColor → WidgetStateProperty<Color?>?
WidgetStateProperty.
no setter
decorationGap → double?
double.
no setter
decorationHaptic → M3EHapticFeedback
M3EHapticFeedback.
no setter
decorationLeadingCustomSize → M3EButtonSize?
M3EButtonSize.
no setter
decorationMenuBackgroundColor → Color?
Color.
no setter
decorationMenuForegroundColor → Color?
Color.
no setter
decorationMotion → M3EButtonMotion?
M3EButtonMotion.
no setter
decorationOverlayColor → WidgetStateProperty<Color?>?
WidgetStateProperty.
no setter
decorationSurfaceTintColor → WidgetStateProperty<Color?>?
WidgetStateProperty.
no setter
decorationTrailingBackgroundColor → Color?
Color.
no setter
decorationTrailingCustomSize → M3EButtonSize?
M3EButtonSize.
no setter
decorationTrailingForegroundColor → Color?
Color.
no setter
enabled → bool
final.
final
enableFeedback → bool
final.
final
focusNode → FocusNode?
final.
final
hashCode → int
The hash code for this object.
no setterinherited
items → List<M3ESplitButtonItem<T>>?
final.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label → String?
final.
final
leadingIcon → IconData?
final.
final
leadingTooltip → String?
final.
final
m3eMenuBuilder → List<M3EMenuNode> Function(BuildContext)?
Rich M3E menu tree. Respects M3ESplitButtonDecoration.menuStyle for popup / native paths. Ignored when menuBuilder is set.
final
Flutter PopupMenuEntry builder. Uses Material showMenu (not M3E).
final
mouseCursor → MouseCursor?
final.
final
onFocusChange → ValueChanged<bool>?
final.
final
onHover → ValueChanged<bool>?
final.
final
onLongPress → VoidCallback?
final.
final
onMultiSelected → void Function(Set<T>)?
final.
final
onPressed → VoidCallback?
final.
final
onSelected → ValueChanged<T>?
final.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedValue → T?
final.
final
shape → M3EButtonShape
final.
final
size → M3EButtonSize
final.
final
splashFactory → InteractiveInkFeatureFactory?
final.
final
statesController → WidgetStatesController?
final.
final
style → M3EButtonStyle
final.
final
trailingAlignment → M3ESplitButtonTrailingAlignment
final.
final
trailingTooltip → String?
final.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<M3ESplitButton<T>>
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