ListObserverController class

Constructors

ListObserverController({ScrollController? controller})

Properties

cacheJumpIndexOffset bool
Whether to cache the offset when jump to a specified index position. Defaults to true.
getter/setter pairinherited
controller ScrollController?
Target scroll controller.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
indexOffsetMap Map<BuildContext, Map<int, ObserveScrollChildModel>>
The map which stores the offset of child in the sliver
getter/setter pairinherited
initialIndex int
The initial index position of the scrollView.
getter/setter pairinherited
initialIndexModel ObserverIndexPositionModel
The initial index position model of the scrollView.
getter/setter pairinherited
initialIndexModelBlock ↔ (ObserverIndexPositionModel Function()?)
The block to return ObserverIndexPositionModel which to init index position.
getter/setter pairinherited
innerDispatchOnceObserveCompleter Completer<ListViewOnceObserveNotificationResult>?
A completer for dispatch once observation
getter/setter pairinherited
innerIsHandlingScroll bool
A flag used to ignore unnecessary calculations during scrolling.
getter/setter pairinherited
innerNeedOnceObserveCallBack ↔ (dynamic Function()?)
The callback to call ObserverWidget's _handleContexts method.
getter/setter pairinherited
innerReattachCallBack ↔ (dynamic Function()?)
The callback to call ObserverWidget's _setupSliverController method.
getter/setter pairinherited
isForbidObserveCallback bool
Whether to forbid the onObserve callback and onObserveAll callback.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sliverContexts List<BuildContext>
Target sliver BuildContext
getter/setter pairinherited

Methods

animateTo({required int index, required Duration duration, required Curve curve, EdgeInsets padding = EdgeInsets.zero, BuildContext? sliverContext, bool isFixedHeight = false, double alignment = 0, ObserverLocateIndexOffsetCallback? offset}) Future
Jump to the specified index position with animation.
clearIndexOffsetCache(BuildContext? sliverContext) → dynamic
Clear the offset cache that jumping to a specified index location.
inherited
clearScrollIndexCache({BuildContext? sliverContext}) → dynamic
Clear the offset cache that jumping to a specified index location.
inherited
dispatchOnceObserve({BuildContext? sliverContext, bool isForce = false, bool isDependObserveCallback = true}) Future<ListViewOnceObserveNotificationResult>
Dispatch a ListViewOnceObserveNotification
fetchSliverContext({BuildContext? sliverContext}) BuildContext?
Get the target sliver BuildContext
inherited
findChildInfo({required int index, BuildContext? sliverContext}) → ObserveFindChildModel?
Find out the child widget info for specified index in sliver.
inherited
findCurrentFirstChild(RenderSliverMultiBoxAdaptor obj) RenderIndexedSemantics?
Find out the current first child in sliver
inherited
findCurrentFirstChildInfo({BuildContext? sliverContext}) → ObserveFindChildModel?
Find out the first child widget info in sliver.
inherited
findCurrentLastChild(RenderSliverMultiBoxAdaptor obj) RenderIndexedSemantics?
Find out the current last child in sliver
inherited
findNextChild({required RenderSliverMultiBoxAdaptor obj, RenderBox? currentChild}) RenderIndexedSemantics?
Find out the next child in sliver
inherited
innerAnimateTo({required int index, required Duration duration, required Curve curve, EdgeInsets padding = EdgeInsets.zero, BuildContext? sliverContext, bool isFixedHeight = false, double alignment = 0, ObserverLocateIndexOffsetCallback? offset, ObserverRenderSliverType? renderSliverType}) Future
Jump to the specified index position with animation.
inherited
innerCreateOnceObserveNotificationResult({required ObserverWidgetObserveResultType resultType, required ObserverHandleContextsResultModel<ListViewObserveModel>? resultModel}) ListViewOnceObserveNotificationResult
Create a observation notification result.
innerDispatchOnceObserve({BuildContext? sliverContext, required Notification notification}) Future<ListViewOnceObserveNotificationResult>
Dispatch a observation notification
inherited
innerHandleDispatchOnceObserveComplete({required ObserverHandleContextsResultModel<ListViewObserveModel>? resultModel}) → dynamic
Complete the observation notification
inherited
innerInitialIndexPosition() → dynamic
Init index position for scrollView.
inherited
innerJumpTo({required int index, BuildContext? sliverContext, bool isFixedHeight = false, double alignment = 0, EdgeInsets padding = EdgeInsets.zero, ObserverLocateIndexOffsetCallback? offset, ObserverRenderSliverType? renderSliverType}) Future
Jump to the specified index position without animation.
inherited
innerReset() → dynamic
Reset all data
inherited
jumpTo({required int index, BuildContext? sliverContext, bool isFixedHeight = false, double alignment = 0, EdgeInsets padding = EdgeInsets.zero, ObserverLocateIndexOffsetCallback? offset}) Future
Jump to the specified index position without animation.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observeFirstItem({BuildContext? sliverContext}) ListViewObserveDisplayingChildModel?
Observe the first child in sliver.
observeItem({required int index, BuildContext? sliverContext}) ListViewObserveDisplayingChildModel?
Observe the child which is specified index in sliver.
reattach() → dynamic
Get the latest target sliver BuildContext and reset some of the old data.
inherited
toString() String
A string representation of this object.
inherited
viewportExtremeScrollExtent({required RenderViewportBase<ContainerParentDataMixin<RenderSliver>> viewport, required RenderSliverMultiBoxAdaptor obj}) double
Getting the extreme scroll extent of viewport. The maxScrollExtent will be returned when growthDirection is forward. The minScrollExtent will be returned when growthDirection is reverse.
inherited
viewportMaxScrollExtent(RenderViewportBase<ContainerParentDataMixin<RenderSliver>> viewport) double
Getting maxScrollExtent of viewport
inherited

Operators

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