primary property

bool? primary
final

Whether this is the primary scroll view associated with the parent PrimaryScrollController.

When this is true, the scroll view is scrollable even if it does not have sufficient content to actually scroll. Otherwise, by default the user can only scroll the view if it has sufficient content. See physics.

Also when true, the scroll view is used for default ScrollActions. If a ScrollAction is not handled by an otherwise focused part of the application, the ScrollAction will be evaluated using this scroll view, for example, when executing Shortcuts key events like page up and down.

On iOS, this also identifies the scroll view that will scroll to top in response to a tap in the status bar.

Cannot be true while a ScrollController is provided to controller, only one ScrollController can be associated with a ScrollView.

Setting to false will explicitly prevent inheriting any PrimaryScrollController.

Defaults to null. When null, and a controller is not provided, PrimaryScrollController.shouldInherit is used to decide automatic inheritance.

By default, the PrimaryScrollController that is injected by each ModalRoute is configured to automatically be inherited on TargetPlatformVariant.mobile for ScrollViews in the Axis.vertical scroll direction. Adding another to your app will override the PrimaryScrollController above it.

The following video contains more information about scroll controllers, the PrimaryScrollController widget, and their impact on your apps:

Defaults to true when [scrollDirection] is [Axis.vertical] and [scrollController] is null.

Implementation

/// Defaults to true when [scrollDirection] is [Axis.vertical] and
/// [scrollController] is null.
final bool? primary;