LivePageView class abstract

A PageView with the page controlled by a MutableCell.

The page cell holds the page that is currently shown. When the value of the page cell is set, the page is changed. When the current page is changed by some other means, such as swiping to the left or right, page is updated to reflect the actual page of the PageView.

An ActionCell can be provided for nextPage. When it is triggered, the current page is advanced to next page. Similarly, when the cell provided for previousPage is triggered, the page is changed to the previous page.

animate controls whether page changes via nextPage and previousPage are animated (true) or not (false).

NOTE: If nextPage or previousPage are triggered, while animated is true, a curve and duration must also be provided.

A MetaCell can be provided for isAnimating. The value of this cell is set to true while an animated page transition is in progress. NOTE: The value of this cell is only updated if the page change is triggered by page, nextPage or prevPage.

Inheritance

Constructors

LivePageView.new({Key? key, required MutableCell<int> page, ValueCell<bool>? animate, ValueCell<Duration>? duration, ValueCell<Curve>? curve, ValueCell<void>? nextPage, ValueCell<void>? previousPage, MetaCell<bool>? isAnimating, Axis scrollDirection, bool reverse, ScrollPhysics? physics, bool pageSnapping, List<Widget> children, DragStartBehavior dragStartBehavior, bool allowImplicitScrolling, String? restorationId, Clip clipBehavior, HitTestBehavior hitTestBehavior, ScrollBehavior? scrollBehavior, bool padEnds})
const
factory
LivePageView.builder({Key? key, required MutableCell<int> page, ValueCell<bool>? animate, ValueCell<Duration>? duration, ValueCell<Curve>? curve, ValueCell<void>? nextPage, ValueCell<void>? previousPage, MetaCell<bool>? isAnimating, Axis scrollDirection, bool reverse, ScrollPhysics? physics, bool pageSnapping, required Widget itemBuilder(BuildContext, int), int? findChildIndexCallback(Key)?, int? itemCount, DragStartBehavior dragStartBehavior, bool allowImplicitScrolling, String? restorationId, Clip clipBehavior, HitTestBehavior hitTestBehavior, ScrollBehavior? scrollBehavior, bool padEnds})
const
factory
LivePageView.custom({Key? key, required MutableCell<int> page, ValueCell<bool>? animate, ValueCell<Duration>? duration, ValueCell<Curve>? curve, ValueCell<void>? nextPage, ValueCell<void>? previousPage, MetaCell<bool>? isAnimating, Axis scrollDirection, bool reverse, ScrollPhysics? physics, bool pageSnapping, required SliverChildDelegate childrenDelegate, DragStartBehavior dragStartBehavior, bool allowImplicitScrolling, String? restorationId, Clip clipBehavior, HitTestBehavior hitTestBehavior, ScrollBehavior? scrollBehavior, bool padEnds})
const
factory

Properties

animate ValueCell<bool>?
no setterinherited
curve ValueCell<Curve>?
no setterinherited
duration ValueCell<Duration>?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isAnimating MetaCell<bool>?
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
nextPage ValueCell<void>?
no setterinherited
page MutableCell<int>
no setterinherited
previousPage ValueCell<void>?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
Creates the mutable state for this widget at a given location in the tree.
inherited
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, int wrapWidth = 65}) 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