RibbonChip class

A selectable command chip for navigation surfaces such as a Backstage menu.

The parent owns selected. Use onPressed for an action, onSelected for choice-style navigation, or both. child permits richer button content while label covers the common icon-and-text case.

Inheritance

Constructors

RibbonChip({Key? key, String? label, Widget? child, Widget? icon, bool selected = false, bool enabled = true, VoidCallback? onPressed, ValueChanged<bool>? onSelected, VoidCallback? onLongPress, ValueChanged<bool>? onHover, ValueChanged<bool>? onFocusChange, FocusNode? focusNode, bool autofocus = false, String? tooltip, String? semanticLabel, ButtonStyle? style, EdgeInsetsGeometry padding = const EdgeInsets.symmetric(horizontal: 12, vertical: 8), Size minimumSize = const Size(0, _controlHeight), AlignmentGeometry alignment = AlignmentDirectional.centerStart, RibbonChipSelectionBehavior selectionBehavior = RibbonChipSelectionBehavior.toggle})
Creates a controlled navigation or action chip.
const

Properties

alignment AlignmentGeometry
final
autofocus bool
final
child Widget?
final
enabled bool
final
focusNode FocusNode?
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
label String?
final
minimumSize Size
final
onFocusChange ValueChanged<bool>?
final
onHover ValueChanged<bool>?
final
onLongPress VoidCallback?
final
onPressed VoidCallback?
final
onSelected ValueChanged<bool>?
final
padding EdgeInsetsGeometry
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
final
selectionBehavior RibbonChipSelectionBehavior
final
semanticLabel String?
final
style ButtonStyle?
final
tooltip String?
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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