GlassTab class
Configuration for a tab in GlassTabBar (all constructors).
GlassTab is the item type for GlassTabBar.bottom and
GlassTabBar.searchable — the iOS 26 UITab / UITabBarItem equivalent.
For GlassSegmentedControl, use GlassSegment instead. GlassSegment is a focused type that only carries fields relevant to a segmented control.
Key fields
- icon — shown in unselected state (and selected state if activeIcon is null)
- activeIcon — shown in selected state (optional)
- label — text label
- glowColor — per-tab glow colour for the selected indicator
- thickness — icon shadow halo intensity
Usage
GlassTabBar.bottom(
tabs: [
GlassTab(
icon: Icon(CupertinoIcons.home),
activeIcon: Icon(CupertinoIcons.house_fill),
label: 'Home',
glowColor: Colors.blue,
),
GlassTab(
icon: Icon(CupertinoIcons.search),
label: 'Search',
),
],
...
)
Migration from GlassBottomBarTab
// BEFORE
GlassBottomBarTab(icon: Icon(Icons.home), activeIcon: Icon(Icons.home_fill), label: 'Home', glowColor: Colors.blue)
// AFTER
GlassTab(icon: Icon(Icons.home), activeIcon: Icon(Icons.home_fill), label: 'Home', glowColor: Colors.blue)
Constructors
Properties
- activeIcon → Widget?
-
Icon widget displayed when the tab is selected.
final
- glowColor → Color?
-
Color of the animated glow effect when this tab is selected.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget?
-
Icon widget displayed when the tab is not selected.
final
- label → String?
-
Label text to display in the tab.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Semantic label for accessibility.
final
- thickness → double?
-
Thickness of the icon shadow halo effect.
final
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