SwayzeScrollController<ParentType extends SwayzeController> class

A SubController that manages scroll of a single table.

It attaches itself to a vertical ScrollController (the same passed to SliverSwayzeTable) and a horizontal one (managed internally by SliverTwoAxisScroll). For that, it uses an internal widget ScrollControllerAttacher that is instantiated under scroll views for both axis.

To verify if this controller was attached to the widget tree, use isAttached.

See also:

Inheritance

Constructors

SwayzeScrollController(ParentType parent)

Properties

hashCode int
The hash code for this object.
no setterinherited
horizontalAutoScrollController ↔ AutoScrollController?
getter/setter pair
horizontalScrollController ScrollController?
When this controller isAttached internally, this points to the internal ScrollController that manages the horizontal scroll view.
getter/setter pair
isAttached bool
Define if this controller was attached to the internal widget tree.
no setter
isAutoScrollOn bool
Returns true if any of the AutoScrollController is instantiated.
no setter
parent → ParentType
The SwayzeController that has created this sub-controller.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
verticalAutoScrollController ↔ AutoScrollController?
getter/setter pair
verticalScrollController ScrollController?
When this controller isAttached internally,this points to the internal ScrollController that manages the horizontal scroll view.
getter/setter pair

Methods

animateToCoordinate(IntVector2 coordinate, {Duration duration = kDefaultScrollAnimationDuration, Curve curve = kDefaultScrollAnimationCurve}) Future<void>
Animate the scroll in both axis to make a specific coordinate visible.
animateToHeader(int index, Axis axis, {Duration duration = kDefaultScrollAnimationDuration, Curve curve = kDefaultScrollAnimationCurve}) Future<void>
Animates the scroll position of an [axis from its current value to the corresponding value of a header in the index index.
dispose() → void
When set to be removed, controllers may have listeners and other references that may create memory dead dependency. dispose should drop such references.
override
ensureTableVisibility({double alignment = 0.0, Duration duration = Duration.zero, Curve curve = Curves.ease, ScrollPositionAlignmentPolicy alignmentPolicy = ScrollPositionAlignmentPolicy.explicit}) Future<void>
Scroll to the table in the vertical axis.
getAutoScrollControllerFor({required Axis axis}) → AutoScrollController?
Get a AutoScrollController for the specified axis.
getScrollControllerFor({required Axis axis}) ScrollController?
Get a ScrollController for the specified axis.
jumpToCoordinate(IntVector2 coordinate) → void
Manages scroll in both axis to instantly scroll to a specific coordinate.
jumpToHeader(int index, Axis axis) → void
Jumps the scroll position of an axis from its current value to the corresponding value of a header in the index index.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startOrUpdateAutoScroll({required AxisDirection direction, required double pointerDistance, double? maxToScroll}) → void
Start or update a AutoScrollActivity in the given AxisDirection until maxToScroll pixels have been scrolled with a velocity calculated from the pointerDistance.
stopAutoScroll(Axis axis) → void
Starts a IdleScrollActivity to stop a ongoing autoscroll activity.
toString() String
A string representation of this object.
inherited

Operators

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