PreloadablePageView class
A scrollable and preloadable list that works page by page, which is modified from PageView.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PreloadablePageView
Constructors
-
PreloadablePageView({Key? key, Axis scrollDirection = Axis.horizontal, bool reverse = false, PageController? controller, ScrollPhysics? physics, bool pageSnapping = true, ValueChanged<
int> ? onPageChanged, List<Widget> children = const <Widget>[], DragStartBehavior dragStartBehavior = DragStartBehavior.start, String? restorationId, Clip clipBehavior = Clip.hardEdge, ScrollBehavior? scrollBehavior, bool padEnds = true, ValueChanged<PageMetrics> ? onPageMetricsChanged, bool callPageChangedAtEnd = true, double? pageMainAxisHintSize, int preloadPagesCount = 0}) - Creates a scrollable list that works page by page from an explicit List of widgets.
-
PreloadablePageView.builder({Key? key, Axis scrollDirection = Axis.horizontal, bool reverse = false, PageController? controller, ScrollPhysics? physics, bool pageSnapping = true, ValueChanged<
int> ? onPageChanged, required IndexedWidgetBuilder itemBuilder, int? itemCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, String? restorationId, Clip clipBehavior = Clip.hardEdge, ScrollBehavior? scrollBehavior, bool padEnds = true, ValueChanged<PageMetrics> ? onPageMetricsChanged, bool callPageChangedAtEnd = true, double? pageMainAxisHintSize, int preloadPagesCount = 0}) - Creates a scrollable list that works page by page using widgets that are created on demand.
Properties
- callPageChangedAtEnd → bool
-
The flag to call onPageChanged when page changing is finished, defaults to true, and this
means it will behave the same as builtin PageView.
final
- childrenDelegate → SliverChildDelegate
-
Mirrors to PageView.childrenDelegate.
final
- clipBehavior → Clip
-
Mirrors to PageView.clipBehavior.
final
- controller → PageController
-
Mirrors to PageView.controller.
final
- dragStartBehavior → DragStartBehavior
-
Mirrors to PageView.dragStartBehavior.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onPageChanged
→ ValueChanged<
int> ? -
Mirrors to PageView.onPageChanged.
final
-
onPageMetricsChanged
→ ValueChanged<
PageMetrics> ? -
The callback that will be invoked when PageMetrics changed, and callPageChangedAtEnd
has no influence on this callback.
final
- padEnds → bool
-
Mirrors to PageView.padEnds.
final
- pageMainAxisHintSize → double?
-
A double value that represents the hint size at page main axis, is used to set the cache
extent for preloading page, defaults to
MediaQuery.of(context).size
.final - pageSnapping → bool
-
Mirrors to PageView.pageSnapping.
final
- physics → ScrollPhysics?
-
Mirrors to PageView.physics.
final
- preloadPagesCount → int
-
An integer value that determines number pages that will be preloaded,defaults to 0.
final
- restorationId → String?
-
Mirrors to PageView.restorationId.
final
- reverse → bool
-
Mirrors to PageView.reverse.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollBehavior → ScrollBehavior?
-
Mirrors to PageView.scrollBehavior.
final
- scrollDirection → Axis
-
Mirrors to PageView.scrollDirection.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PreloadablePageView> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited