physics property
The axis along which the scroll view scrolls.
Defaults to Axis.vertical. Whether the scroll view scrolls in the reading direction.
For example, if the reading direction is left-to-right and
scrollDirection
is Axis.horizontal, then the scroll view scrolls from
left to right when reverse
is false and from right to left when
reverse
is true.
Similarly, if scrollDirection
is Axis.vertical, then the scroll view
scrolls from top to bottom when reverse
is false and from bottom to top
when reverse
is true.
Defaults to false. An object that can be used to control the position to which this scroll view is scrolled.
Must be null if primary
is true.
A ScrollController serves several purposes. It can be used to control the initial scroll position (see ScrollController.initialScrollOffset). It can be used to control whether the scroll view should automatically save and restore its scroll position in the PageStorage (see ScrollController.keepScrollOffset). It can be used to read the current scroll position (see ScrollController.offset), or change it (see ScrollController.animateTo). Whether this is the primary scroll view associated with the parent PrimaryScrollController.
On iOS, this identifies the scroll view that will scroll to top in response to a tap in the status bar.
Defaults to true when scrollDirection
is Axis.vertical and
controller
is null.
How the scroll view should respond to user input.
For example, determines how the scroll view continues to animate after the user stops dragging the scroll view.
Defaults to matching platform conventions.
Implementation
// final Axis scrollDirection;
/// Whether the scroll view scrolls in the reading direction.
///
/// For example, if the reading direction is left-to-right and
/// [scrollDirection] is [Axis.horizontal], then the scroll view scrolls from
/// left to right when [reverse] is false and from right to left when
/// [reverse] is true.
///
/// Similarly, if [scrollDirection] is [Axis.vertical], then the scroll view
/// scrolls from top to bottom when [reverse] is false and from bottom to top
/// when [reverse] is true.
///
/// Defaults to false.
// final bool reverse;
/// An object that can be used to control the position to which this scroll
/// view is scrolled.
///
/// Must be null if [primary] is true.
///
/// A [ScrollController] serves several purposes. It can be used to control
/// the initial scroll position (see [ScrollController.initialScrollOffset]).
/// It can be used to control whether the scroll view should automatically
/// save and restore its scroll position in the [PageStorage] (see
/// [ScrollController.keepScrollOffset]). It can be used to read the current
/// scroll position (see [ScrollController.offset]), or change it (see
/// [ScrollController.animateTo]).
// final ScrollController? controller;
/// Whether this is the primary scroll view associated with the parent
/// [PrimaryScrollController].
///
/// On iOS, this identifies the scroll view that will scroll to top in
/// response to a tap in the status bar.
///
/// Defaults to true when [scrollDirection] is [Axis.vertical] and
/// [controller] is null.
// final bool? primary;
/// How the scroll view should respond to user input.
///
/// For example, determines how the scroll view continues to animate after the
/// user stops dragging the scroll view.
///
/// Defaults to matching platform conventions.
final ScrollPhysics? physics;