TwoDimensionalChildBuilderDelegate class

A delegate that supplies children for a TwoDimensionalScrollView using a builder callback.

The widgets returned from the builder callback are automatically wrapped in RepaintBoundary widgets if addRepaintBoundaries is true (also the default).

See also:

Inheritance

Constructors

TwoDimensionalChildBuilderDelegate({required TwoDimensionalIndexedWidgetBuilder builder, int? maxXIndex, int? maxYIndex, bool addRepaintBoundaries = true, bool addAutomaticKeepAlives = true})
Creates a delegate that supplies children for a TwoDimensionalScrollView using the given builder callback.

Properties

addAutomaticKeepAlives bool
Whether to wrap each child in an AutomaticKeepAlive.
final
addRepaintBoundaries bool
Whether to wrap each child in a RepaintBoundary.
final
builder TwoDimensionalIndexedWidgetBuilder
Called to build children on demand.
final
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
maxXIndex int?
The maximum ChildVicinity.xIndex for children in the x axis.
getter/setter pair
maxYIndex int?
The maximum ChildVicinity.yIndex for children in the y axis.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
build(BuildContext context, covariant ChildVicinity vicinity) Widget?
Returns the child with the given ChildVicinity, which is described in terms of x and y indices.
override
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
shouldRebuild(covariant TwoDimensionalChildDelegate oldDelegate) bool
Called whenever a new instance of the child delegate class is provided.
override
toString() String
A string representation of this object.
inherited

Operators

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