ExtentPrecalculationPolicy class abstract

Subclass of ExtentPrecalculationPolicy can be used to control whether and how many extents of the items in the list should be eagerly precalculated.

Extent precalculation may be helpful when precise scrollbar behavior is desired. This is relevant for smaller lists, where the difference between estimated and actual extents may affect the scrollbar position noticeably.

For larger lists, precalculating extents has diminishing benefits since the difference between estimated and actual extent for each item has much smaller impact on the scrollbar position.

There is no perfect answer for when or whether at all to precalculate extents It depends on the specific application requirements.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addDelegate(ExtentPrecalculationPolicyDelegate? value) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAttached() → void
Called when the policy is attached to a SuperSliverList. Single policy may be attached to multiple SuperSliverLists.
onDetached() → void
Called when the policy is detached from a SuperSliverList.
removeDelegate(ExtentPrecalculationPolicyDelegate? value) → void
shouldPrecalculateExtents(ExtentPrecalculationContext context) bool
Called during layout to determine whether more extents should be precalculated.
toString() String
A string representation of this object.
inherited
valueDidChange() → void
Notifies the SuperSliverList that the policy has changed. If the policy returned false from shouldPrecalculateExtents and then the condition changed and more extents should be precalculated, the policy calls valueDidChange to let the SliverList know that the policy has changed and the precalculation should be attempted again.

Operators

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