NestedPageView class

Inheritance

Constructors

NestedPageView({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, bool allowImplicitScrolling = false, String? restorationId, Clip clipBehavior = Clip.hardEdge, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque, ScrollBehavior? scrollBehavior, bool padEnds = true, bool wantKeepAlive = true})
NestedPageView.builder({Key? key, Axis scrollDirection = Axis.horizontal, bool reverse = false, PageController? controller, ScrollPhysics? physics, bool pageSnapping = true, ValueChanged<int>? onPageChanged, required NullableIndexedWidgetBuilder itemBuilder, ChildIndexGetter? findChildIndexCallback, int? itemCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool allowImplicitScrolling = false, String? restorationId, Clip clipBehavior = Clip.hardEdge, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque, ScrollBehavior? scrollBehavior, bool padEnds = true, bool wantKeepAlive = true})
NestedPageView.custom({Key? key, Axis scrollDirection = Axis.horizontal, bool reverse = false, PageController? controller, ScrollPhysics? physics, bool pageSnapping = true, ValueChanged<int>? onPageChanged, required SliverChildDelegate childrenDelegate, DragStartBehavior dragStartBehavior = DragStartBehavior.start, bool allowImplicitScrolling = false, String? restorationId, Clip clipBehavior = Clip.hardEdge, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque, ScrollBehavior? scrollBehavior, bool padEnds = true, bool wantKeepAlive = true})
const

Properties

allowImplicitScrolling bool
Controls whether the widget's pages will respond to RenderObject.showOnScreen, which will allow for implicit accessibility scrolling.
finalinherited
childrenDelegate SliverChildDelegate
A delegate that provides the children for the PageView.
finalinherited
clipBehavior Clip
The content will be clipped (or not) according to this option.
finalinherited
controller PageController?
An object that can be used to control the position to which this page view is scrolled.
finalinherited
dragStartBehavior DragStartBehavior
Determines the way that drag start behavior is handled.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hitTestBehavior HitTestBehavior
Defines the behavior of gesture detector used in this Scrollable.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onPageChanged ValueChanged<int>?
Called whenever the page in the center of the viewport changes.
finalinherited
padEnds bool
Whether to add padding to both ends of the list.
finalinherited
pageSnapping bool
Set to false to disable page snapping, useful for custom scroll behavior.
finalinherited
physics ScrollPhysics?
How the page view should respond to user input.
finalinherited
restorationId String?
Restoration ID to save and restore the scroll offset of the scrollable.
finalinherited
reverse bool
Whether the page view scrolls in the reading direction.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollBehavior ScrollBehavior?
A ScrollBehavior that will be applied to this widget individually.
finalinherited
scrollDirection Axis
The Axis along which the scroll view's offset increases with each page.
finalinherited
wantKeepAlive bool
是否缓存可滚动页面,不缓存可能导致页面在嵌套滚动时被销毁导致手势事件丢失
final

Methods

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