TwoDimensionalScrollView class abstract
A widget that combines a TwoDimensionalScrollable and a TwoDimensionalViewport to create an interactive scrolling pane of content in both vertical and horizontal dimensions.
A two-way scrollable widget consist of three pieces:
- A TwoDimensionalScrollable widget, which listens for various user gestures and implements the interaction design for scrolling.
- A TwoDimensionalViewport widget, which implements the visual design for scrolling by displaying only a portion of the widgets inside the scroll view.
- A TwoDimensionalChildDelegate, which provides the children visible in the scroll view.
TwoDimensionalScrollView helps orchestrate these pieces by creating the TwoDimensionalScrollable and deferring to its subclass to implement buildViewport, which builds a subclass of TwoDimensionalViewport. The TwoDimensionalChildDelegate is provided by the delegate parameter.
A TwoDimensionalScrollView has two different ScrollPositions, one for each Axis. This means that there are also two unique ScrollControllers for these positions. To provide a ScrollController to access the ScrollPosition, use the ScrollableDetails.controller property of the associated axis that is provided to this scroll view.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- TwoDimensionalScrollView
Constructors
- TwoDimensionalScrollView({Key? key, bool? primary, Axis mainAxis = Axis.vertical, ScrollableDetails verticalDetails = const ScrollableDetails.vertical(), ScrollableDetails horizontalDetails = const ScrollableDetails.horizontal(), required TwoDimensionalChildDelegate delegate, double? cacheExtent, DiagonalDragBehavior diagonalDragBehavior = DiagonalDragBehavior.none, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, Clip clipBehavior = Clip.hardEdge, HitTestBehavior hitTestBehavior = HitTestBehavior.opaque})
-
Creates a widget that scrolls in both dimensions.
const
Properties
- cacheExtent → double?
-
The viewport has an area before and after the visible area to cache items
that are about to become visible when the user scrolls.
final
- clipBehavior → Clip
-
The content will be clipped (or not) according to this option.
final
- delegate → TwoDimensionalChildDelegate
-
A delegate that provides the children for the TwoDimensionalScrollView.
final
- diagonalDragBehavior → DiagonalDragBehavior
-
Whether scrolling gestures should lock to one axes, allow free movement
in both axes, or be evaluated on a weighted scale.
final
- dragStartBehavior → DragStartBehavior
-
Determines the way that drag start behavior is handled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hitTestBehavior → HitTestBehavior
-
Defines the behavior of gesture detector used in this Scrollable.
final
- horizontalDetails → ScrollableDetails
-
The configuration of the horizontal Scrollable.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardDismissBehavior → ScrollViewKeyboardDismissBehavior
-
ScrollViewKeyboardDismissBehavior the defines how this ScrollView will
dismiss the keyboard automatically.
final
- mainAxis → Axis
-
The main axis of the two.
final
- primary → bool?
-
Whether this is the primary scroll view associated with the parent
PrimaryScrollController.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- verticalDetails → ScrollableDetails
-
The configuration of the vertical Scrollable.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
buildViewport(
BuildContext context, ViewportOffset verticalOffset, ViewportOffset horizontalOffset) → Widget - Build the two dimensional viewport.
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's 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.
override
-
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