InjectedScrolling class Null safety

This injected state abstracts the best practices to come out with a simple, clean, and testable approach to control Scrollable view.

Constructors

InjectedScrolling()

Properties

autoDisposeWhenNotUsed bool
read-only, inherited
controller ScrollController
The created ScrollController
read-only
error → dynamic
The error
read-only, inherited
hasData bool
The state is mutated successfully.
read-only, inherited
hasEndedScrolling bool
The scrolling list has just ended scrolling.
read / write
hasError bool
The stats has error
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
hasObservers bool
Whether the state has observers
read-only, inherited
hasReachedMaxExtent bool
The scroll list has reached its bottom (the current offset is greater or equal then maxScrollExtent)
read / write
hasReachedMinExtent bool
The scroll list has reached its top (the current offset is less or equal then minScrollExtent)
read / write
hasStartedScrolling bool
This scrolling list has just started scrolling.
read / write
hasStartedScrollingForward bool
The scrolling list has just started scrolling in the forward direction.
read / write
hasStartedScrollingReverse bool
The scrolling list has just started scrolling in the reverse direction.
read / write
isActive bool
Whether the state is active or not. [...]
read-only, inherited
isDone bool
The state is mutated using a stream and the stream is done.
read-only, inherited
isIdle bool
The state is initialized and never mutated.
read-only, inherited
isScrolling bool
Whether the associates Scroll view is scrolling.
read / write
isScrollingForward bool
Scrolling is happening in the positive scroll offset direction.
read-only
isScrollingReverse bool
Scrolling is happening in the negative scroll offset direction.
read-only
isWaiting bool
The state is waiting for and asynchronous task to end.
read-only, inherited
maxScrollExtent double
The maximum in-range value for pixels. [...]
read-only
minScrollExtent double
The minimum in-range value for pixels. [...]
read-only
offset double
The current offset
read-only
oldSnapState SnapState<double>
read-only, inherited
rebuild → _RebuildScrolling
Listen to the InjectedScrolling and rebuild when scrolling data is changed.
late, final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
snapState SnapState<double>
A snap representation of the state
read / write, inherited
state double
read / write, inherited-getter
stateAsync Future<double>
It is a future of the state. The future is active if the state is on the isWaiting status.
read-only, inherited

Methods

dispose() → void
Dispose the state.
inherited
initializeState() FutureOr<double>
Initialize the state
inherited
moveTo(double to, {Duration? duration, Curve? curve, bool? clamp = true}) Future<void>
Calls ScrollPosition.jumpTo if duration is null or Duration.zero, otherwise ScrollPosition.animateTo is called. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
notify() → void
Notify observers
inherited
onAll<R>({R onIdle()?, required R onWaiting()?, required R onError(dynamic error, VoidCallback refreshError)?, required R onData(double data)}) → R
inherited
onOrElse<R>({R onIdle()?, R onWaiting()?, R onError(dynamic error, VoidCallback refreshError)?, R onData(double data)?, required R orElse(double data)}) → R
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited