ScrollBarPolicy enum

The policy that dictates how a ScrollPane will lay its ScrollPane.view out within a given Axis, which directly affects how and when the scrollbar is shown in that axis.

See also:

Inheritance

Constructors

ScrollBarPolicy()
const

Values

auto → const ScrollBarPolicy

Lays the view out with unconstrained size in the axis, and shows a scrollbar only when the viewport's size is less than needed to display the entirety of the view.

This policy is somewhat expensive in terms of layout performance.

never → const ScrollBarPolicy

Lays the view out with unconstrained size in the axis, and never shows a scrollbar, even if the viewport's size is less than needed to display the entirety of the view.

The scroll pane will still respond to trackpad / mouse wheel and padding (with a touch input) events by scrolling.

Along with the always and stretch policies, this policy is the cheapest in terms of layout performance.

always → const ScrollBarPolicy

Lays the view out with unconstrained size in the axis, and always shows a scrollbar, even if the viewport's size is large enough to display the entirety of the view.

If the viewport's size is large enough to display the entirety of the view, the scrollbar will be disabled.

Along with the never and stretch policies, this policy is the cheapest in terms of layout performance.

stretch → const ScrollBarPolicy

Lays the view out with tight constraints such that the view will be exactly the same size in the axis as the viewport's size in that axis.

With this policy, a scrollbar will never be shown because the view is always exactly as big as the viewport, even if that size is less than the view's intrinsic size.

Along with the always and never policies, this policy is the cheapest in terms of layout performance.

expand → const ScrollBarPolicy

Gives the view at least its minimum intrinsic size, and stretches the view to match the viewport's size in the axis if there's any excess space.

The existence of the scrollbar is the same with this policy as with the auto policy. The difference between the two policies is that with this policy, when the scrollbar is not needed, the view will be stretched to exactly fit the size of the viewport in the axis.

This policy is somewhat expensive in terms of layout performance.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<ScrollBarPolicy>
A constant List of the values in this enum, in order of their declaration.