GlassBarItemStyle enum
Visual style of a pinned bar item.
Mirrors UIKit's UIBarButtonItem.Style (.plain / .prominent) and
SwiftUI's .buttonStyle(.glass) / .buttonStyle(.glassProminent) (as
applied by ToolbarItem(placement: .confirmationAction)).
Values
- plain → const GlassBarItemStyle
-
Standard adaptive glass bar item (the default).
- prominent → const GlassBarItemStyle
-
Prominent accent-tinted glass bar item for primary and confirmation actions (for example,
"Done","Save", or a confirmation checkmark).Automatically resolves
backgroundto GlassBarItemBackground.separate when omitted so the item stands in its own capsule rather than merging with plain neighbours. Floods the capsule withtintColor— or the ambientCupertinoTheme.of(context).primaryColor(resolved for the active brightness) whentintColoris null — using GlassBodyMode.clear at translucent prominent opacity, styles text labels inFontWeight.w600, and automatically flips the foreground icon or text to high-contrast white or black based on luminance.When
enabledisfalse, the accent fill reverts to neutral bar glass with a dimmed foreground, matching native iOS 26/27 so an unavailable primary action does not dominate the bar.Note: unlike standalone
GlassButton(style: GlassButtonStyle.prominent)(which stays neutral frosted glass when untinted for 1.x compatibility), GlassBarItemStyle.prominent defaults directly to the app's accent colour to match native iOS 26/27UIBarButtonItem.Style.prominent.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
GlassBarItemStyle> - A constant List of the values in this enum, in order of their declaration.