ListWheelChildListDelegate class Null safety
A delegate that supplies children for ListWheelScrollView using an explicit list.
ListWheelScrollView lazily constructs its children to avoid creating more children than are visible through the Viewport. This delegate provides children using an explicit list, which is convenient but reduces the benefit of building children lazily.
In general building all the widgets in advance is not efficient. It is better to create a delegate that builds them on demand using ListWheelChildBuilderDelegate or by subclassing ListWheelChildDelegate directly.
This class is provided for the cases where either the list of children is known well in advance (ideally the children are themselves compile-time constants, for example), and therefore will not be built each time the delegate itself is created, or the list is small, such that it's likely always visible (and thus there is nothing to be gained by building it on demand). For example, the body of a dialog box might fit both of these conditions.
The list containing all children that can be supplied.
- estimatedChildCount → int
Returns an estimate of the number of children this delegate will build.
- hashCode → int
The hash code for this object. [...]
- runtimeType → Type
A representation of the runtime type of the object.
BuildContext context, int index) → Widget?
Return the child at the given index. If the child at the given
index does not exist, return null.
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
covariant ListWheelChildListDelegate oldDelegate) → bool
Called to check whether this and the old delegate are actually 'different',
so that the caller can decide to rebuild or not.
) → String
A string representation of this object. [...]
int index) → int
Returns the true index for a child built at a given index. Defaults to
the given index, however if the delegate is ListWheelChildLoopingListDelegate,
this value is the index of the true element that the delegate is looping to. [...]