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:
- SwayzeSelectionController another SubController that manages selections on a table.
ScrollControllerAttacher
that attaches this controller into the internal widget tree.
- Inheritance
-
- Object
- ControllerBase
- SubController<
ParentType> - SwayzeScrollController
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 specifiedaxis
. -
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 indexindex
. -
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 untilmaxToScroll
pixels have been scrolled with a velocity calculated from thepointerDistance
. -
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