GlassButtonGroup class Panels and controls
Adjacent actions in one glass capsule — a circle for one — as iOS 26's toolbar draws them. One surface whatever the count.
The group is kGlassToolbarHeight tall and kGlassToolbarItemWidth wide per item. A held item brightens its own cell of the capsule by pressedOverlay, the way GlassButton brightens its whole; a disabled item is drawn at 0.3 opacity. A focused item is pressed by Space or Enter, and ringed inside its cell.
The items run in the reading direction: under TextDirection.rtl the first is at the right.
GlassButtonGroup(
items: <GlassToolbarItem>[
GlassToolbarItem(icon: const Icon(Icons.reply), label: 'Reply', onPressed: reply),
GlassToolbarItem(icon: const Icon(Icons.archive), label: 'Archive', onPressed: archive),
GlassToolbarItem(icon: const Icon(Icons.delete), label: 'Delete', onPressed: delete),
],
)
Note: three GlassButtons are three surfaces, and the fragmentation excess grows as the square of the count. Three items here are one.
See also:
- GlassButton, a single action with a label of its own.
- GlassBar, which a group can sit beside or, at the price of glass on glass, on.
- Toolbar on the site.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GlassButtonGroup
Constructors
-
GlassButtonGroup({required List<
GlassToolbarItem> items, GlassFinish? finish, Color? pressedOverlay, Key? key}) -
A group of
items, of which there must be at least one.const
Properties
- finish → GlassFinish?
-
The optics. Null takes the theme's.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
items
→ List<
GlassToolbarItem> -
The actions, in the reading direction.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- pressedOverlay → Color?
-
What is added over a held item's cell. Null takes the finish's rim, as
GlassButton does.
final
- 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< GlassButtonGroup> -
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