SliverOverlapAbsorberHandle class
Handle to provide to a SliverOverlapAbsorber, a SliverOverlapInjector, and an NestedScrollViewViewport, to shift overlap in a NestedScrollView.
A particular SliverOverlapAbsorberHandle can only be assigned to a single SliverOverlapAbsorber at a time. It can also be (and normally is) assigned to one or more SliverOverlapInjectors, which must be later descendants of the same NestedScrollViewViewport as the SliverOverlapAbsorber. The SliverOverlapAbsorber must be a direct descendant of the NestedScrollViewViewport, taking part in the same sliver layout. (The SliverOverlapInjector can be a descendant that takes part in a nested scroll view's sliver layout.)
Whenever the NestedScrollViewViewport is marked dirty for layout, it will cause its assigned SliverOverlapAbsorberHandle to fire notifications. It is the responsibility of the SliverOverlapInjectors (and any other clients) to mark themselves dirty when this happens, in case the geometry subsequently changes during layout.
See also:
- NestedScrollView, which uses a NestedScrollViewViewport and a SliverOverlapAbsorber to align its children, and which shows sample usage for this class.
- Inheritance
- Object
- ChangeNotifier
- SliverOverlapAbsorberHandle
Constructors
Properties
- layoutExtent → double
-
The current amount of overlap being absorbed by the
SliverOverlapAbsorber. [...]
read-only
- scrollExtent → double
-
The total scroll extent of the gap being absorbed by the
SliverOverlapAbsorber. [...]
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- hasListeners → bool
-
Whether any listeners are currently registered. [...]
@protected, read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
toString(
) → String -
Returns a string representation of this object.
override
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes. [...]
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener and removeListener will throw after the object is
disposed). [...]
@mustCallSuper, inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
notifyListeners(
) → void -
Call all the registered listeners. [...]
@protected, inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes. [...]
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited