TwoDimensionalScrollView constructor

const TwoDimensionalScrollView({
  1. Key? key,
  2. bool? primary,
  3. Axis mainAxis = Axis.vertical,
  4. ScrollableDetails verticalDetails = const ScrollableDetails.vertical(),
  5. ScrollableDetails horizontalDetails = const ScrollableDetails.horizontal(),
  6. required TwoDimensionalChildDelegate delegate,
  7. double? cacheExtent,
  8. DiagonalDragBehavior diagonalDragBehavior = DiagonalDragBehavior.none,
  9. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  10. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  11. Clip clipBehavior = Clip.hardEdge,
  12. HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
})

Creates a widget that scrolls in both dimensions.

The primary argument is associated with the mainAxis. The main axis ScrollableDetails.controller must be null if primary is configured for that axis. If primary is true, the nearest PrimaryScrollController surrounding the widget is attached to the scroll position of that axis.

Implementation

const TwoDimensionalScrollView({
  super.key,
  this.primary,
  this.mainAxis = Axis.vertical,
  this.verticalDetails = const ScrollableDetails.vertical(),
  this.horizontalDetails = const ScrollableDetails.horizontal(),
  required this.delegate,
  this.cacheExtent,
  this.diagonalDragBehavior = DiagonalDragBehavior.none,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.clipBehavior = Clip.hardEdge,
  this.hitTestBehavior = HitTestBehavior.opaque,
});