LiquidTabBarController class

The bar's shared state: whether it is folded, and which material tier it renders. Give one to every LiquidTabBar that should move together, and feed it the pages' scroll notifications through handleScroll.

Fold follows the scroll, the way iOS 26's bar does: scrolling down through content folds the bar into a pill holding only the selected tab; scrolling back up, reaching the top, or switching tabs opens it again. A page too short to scroll under the bar never folds it.

The tier is automatic: glass (the refraction shader) wherever Impeller runs it, blur where it does not, and — outside debug builds — a frame governor that steps a struggling device down to blur for the session: a full-width backdrop shader every scrolled frame is exactly what an old GPU drops frames on, and a bar that stutters is worse than one that is flat.

Inheritance

Constructors

LiquidTabBarController({LiquidTabBarMaterial material = LiquidTabBarMaterial.auto, bool shrinkOnScroll = true, LiquidGovernorConfig governorConfig = const LiquidGovernorConfig()})

Properties

clearTextOnClose → bool
Whether the most recent call to closeSearch requested clearing the search field.
no setter
effectiveMaterial → LiquidTabBarMaterial
The tier actually drawn — LiquidTabBarMaterial.auto resolved.
no setter
governorConfig → LiquidGovernorConfig
Configuration thresholds for the frame governor.
final
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isDegraded → bool
Whether the governor stepped down the material tier due to frame drops.
no setter
isDisposed → bool
Whether dispose has been called on this controller.
no setter
isGovernorArmed → bool
Whether armGovernor has been called on this controller.
no setter
isSearching → bool
Whether the tab bar is currently morphed into an active search input field.
no setter
material ↔ LiquidTabBarMaterial
getter/setter pair
minimized → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shrinkOnScroll ↔ bool
Whether handleScroll allows folding/shrinking the bar when scrolling down.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
armGovernor() → void
Arms the frame governor (monitors frame timings while the glass tier is on).
checkGovernor() → void
Re-checks governor status and arms frame timing monitoring if conditions are met.
closeSearch({bool clearText = false}) → void
Closes the search morph and returns the bar to regular tab mode.
dispose() → void
Discards any resources used by the object.
override
expand() → void
handleScroll(ScrollNotification n, {bool allowNested = false}) → bool
Feed a page's scroll notifications here (a NotificationListener above the pages is the usual place). Always returns false so the notification keeps bubbling.
minimize() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onTimings(List<FrameTiming> timings) → void
Manually feeds frame timings to the governor for testing slow-frame degradation.
openSearch() → void
Morphs the bar into search input mode if a search action is present.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resetGovernor() → void
Reset the degraded status if the frame governor had stepped the tier down.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

shared → LiquidTabBarController
The controller a LiquidTabBar uses when given none — one per app, so every bar folds and unfolds as one.
final