ScrollCacheExtent class sealed
The amount of additional content to display and lay out around the viewport.
The cache area is used to lay out slivers before they are visible on screen. Items that fall in this cache area are laid out even though they are not visible on screen. This allows the viewport to render them ahead of time, enabling a smoother scrolling experience as items scroll into view.
This class encapsulates both the value and the style of the cache extent. It allows the cache extent to be defined either as a fixed number of logical pixels using ScrollCacheExtent.pixels or as a multiplier of the viewport's main axis extent using ScrollCacheExtent.viewport.
See also:
- Viewport.scrollCacheExtent, which uses this class to define the cache area.
- Annotations
Constructors
- ScrollCacheExtent.pixels(double pixels)
-
Creates a cache extent in logical pixels.
constfactory
- ScrollCacheExtent.viewport(double value)
-
Creates a cache extent as a multiplier of the viewport's main axis extent.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → CacheExtentStyle
-
Returns the style of the cache extent.
no setter
- value → double
-
Returns the raw value of the cache extent.
no setter
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