M3EAppBarController class
Drives an app bar: expand, collapse, show, hide, and follow the scroll.
Attach by passing the controller to M3EAppBar.top, M3EAppBar.search,
or M3EAppBar.sliver. isCollapsed and isVisible update as the bar
scrolls or the methods run.
- Inheritance
-
- Object
- ChangeNotifier
- M3EAppBarController
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isCollapsed → bool
-
Whether the sliver has collapsed to the small content height.
no setter
- isVisible → bool
-
Whether the bar is showing. False after hide.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
attach(
{required bool collapsed, required bool visible, required Future< void> expand(), required Future<void> collapse(), required Future<void> show(), required Future<void> hide(), Future<void> followScroll()?}) → void - Binds the sliver that this controller drives.
-
collapse(
) → Future< void> - Scrolls until the attached sliver is at its small content height.
-
detach(
) → void - Drops the bound sliver.
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
expand(
) → Future< void> - Scrolls the attached sliver back to the top so the bar expands.
-
followScroll(
) → Future< void> - Clears a manual show or hide so the bar follows its hide mode.
-
hide(
) → Future< void> - Moves the bar off the content band. The system inset stays.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
show(
) → Future< void> - Brings a hidden bar back.
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
{required bool collapsed, required bool visible}) → void - Publishes collapsed and visible state from the bound sliver.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited