State for widgets that subclass Pageable.

Specializes ScrollableState to support page-based scrolling.

Subclasses typically override buildContent to build viewports.

Inheritance

Constructors

PageableState()

Properties

pixelsPerScrollUnit double

Convert from the item based scroll units to logical pixels.

read-only
platform TargetPlatform

Returns the style of scrolling to use.

read-only
scrollBehavior ExtentScrollBehavior

read-only
shouldSnapScrollOffset bool

read-only
config → T

The current configuration.

read-only, inherited
context BuildContext

The location in the tree where this widget builds.

read-only, inherited
hashCode int

Get a hash code for this object.

read-only, inherited
mounted bool

Whether this State object is currently in a tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited
scrollOffset double

The current scroll offset.

read-only, inherited
virtualScrollOffset double

The current scroll offset, irrespective of the constraints defined by any ClampOverscrolls widget ancestors.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

createScrollBehavior() ExtentScrollBehavior

Use the value returned by ScrollConfiguration.createScrollBehavior. If this widget doesn't have a ScrollConfiguration ancestor, or its createScrollBehavior callback is null, then return a new instance of OverscrollWhenScrollableBehavior.

didUpdateConfig(Pageable oldConfig) → void

Called whenever the configuration changes.

fling(double scrollVelocity) Future<Null>

If scrollVelocity is greater than PixelScrollTolerance.velocity then fling the scroll offset with the given velocity in logical pixels/second. Otherwise, if this scrollable is overscrolled or a snapOffsetCallback was given, animate the scroll offset to its final value with settleScrollOffset.

pixelOffsetToScrollOffset(double pixelOffset) double

Convert a position or velocity measured in terms of pixels to a scrollOffset. Scrollable gesture handlers convert their incoming values with this method. Subclasses that define scrollOffset in units other than pixels must override this method.

scrollOffsetToPixelOffset(double scrollOffset) double

Convert a scrollOffset value to the number of pixels to which it corresponds.

settleScrollOffset() Future<Null>

Animate the scroll offset to a value with a local minima of energy.

snapScrollOffset(double newScrollOffset) double

Returns the snapped offset closest to the given scroll offset.

build(BuildContext context) Widget

Describes the part of the user interface represented by this widget.

inherited
buildContent(BuildContext context) Widget

Calls the widget's builder by default.

inherited
buildGestureDetectors() Map<Type, GestureRecognizerFactory>

Return the gesture detectors, in the form expected by RawGestureDetector.gestures and RawGestureDetectorState.replaceGestureRecognizers, that are applicable to this Scrollable in its current state.

inherited
createTicker(TickerCallback onTick) Ticker

Creates a ticker with the given callback.

inherited
deactivate() → void

Called when this object is removed from the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
dependenciesChanged() → void

Called when a dependency of this State object changes.

inherited
didUpdateScrollBehavior(double newScrollOffset) → void

Update any in-progress scrolling physics to account for new scroll behavior.

inherited
dispatchOnScroll() → void

Calls the onScroll callback.

inherited
dispatchOnScrollEnd() → void

Calls the dispatchOnScrollEnd callback.

inherited
dispatchOnScrollStart() → void

Calls the onScrollStart callback.

inherited
dispose() → void

Called when this object is removed from the tree permanently.

inherited
handleExtentsChanged(double contentExtent, double containerExtent) → void

Updates the scroll behavior for the new content and container extent.

inherited
initState() → void

Called when this object is inserted into the tree.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
pixelDeltaToScrollOffset(Offset pixelDelta) double

Returns the scroll offset component of the given pixel delta, accounting for the scroll direction and scroll anchor.

inherited
reassemble() → void

Called whenever the application is reassembled during debugging.

inherited
scrollBy(double scrollDelta, { Duration duration, Curve curve: Curves.ease, DragUpdateDetails details }) Future<Null>

Scroll this widget by the given scroll delta.

inherited
scrollOffsetToPixelDelta(double scrollOffset) Offset

Returns a two-dimensional representation of the scroll offset, accounting for the scroll direction and scroll anchor.

inherited
scrollTo(double newScrollOffset, { Duration duration, Curve curve: Curves.ease, DragUpdateDetails details }) Future<Null>

Scroll this widget to the given scroll offset.

inherited
setState(VoidCallback fn) → void

Notify the framework that the internal state of this object has changed.

inherited
toString() String

Returns a string representation of this object.

inherited
updateGestureDetector() → void

Fixes up the gesture detector to listen to the appropriate gestures based on the current information about the layout.

inherited