MiuixTopAppBarState class
TopAppBar 的状态。对应 Kotlin TopAppBarState。
持有折叠偏移量、内容滚动偏移量等,并通过 notifyListeners 通知监听者。 通常由 MiuixScrollBehavior 持有并更新,由 MiuixTopAppBar 读取。
- Inheritance
-
- Object
- ChangeNotifier
- MiuixTopAppBarState
Constructors
- MiuixTopAppBarState({double initialHeightOffsetLimit = double.negativeInfinity, double initialHeightOffset = 0, double initialContentOffset = 0})
Properties
- collapsedFraction → double
-
折叠百分比。
0.0完全展开,1.0完全折叠。no setter - contentOffset ↔ double
-
TopAppBar 下方内容的累计滚动偏移量。
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- heightOffset ↔ double
-
当前折叠偏移量,被夹在 heightOffsetLimit 与 0 之间。
getter/setter pair
- heightOffsetLimit ↔ double
-
折叠高度上限(负数,表示允许的最大折叠像素数)。
getter/setter pair
- overlappedFraction → double
-
内容与 TopAppBar 的重叠百分比。
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
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pin(
) → void - 把折叠上限锁为 0(SmallTopAppBar 的 pinned 语义),绕过瞬时零值防护。
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited