HListView

Class
A widget that efficiently renders a large number of children in a vertical list.Wraps Unity's ListView.

Fields

builder: BuildFunction<int>
count: int
fixedItemHeight: float
scrollController: ScrollController

Constructors

HListView(builder: BuildFunction<int>, count: int, fixedItemHeight: float, scrollController: ScrollController, key: Key, constants: object[], modifiers: IReadOnlyCollection<Modifier>)
Creates a widget that efficiently renders a large number of children in a vertical list.

Parameters

builder:BuildFunction<int> - The function that builds a child widget for a given index.
count:int - The number of items in the list.
fixedItemHeight:float - If set to a non-negative value, the height of each item will be fixed to this value, improving performance. If set to a negative value, the height will be dynamically determined for each item.
scrollController:ScrollController - The ScrollController to use for this list. If not specified, a controller will be created and managed by the widget's state.
key:Key - Passed on to Widget.key.
constants:object[] - Passed on to Widget.constants.
modifiers:IReadOnlyCollection<Modifier> - Passed on to Widget.modifiers.

Methods

CreateElement(): IWidgetElement
Creates a new IWidgetElement for the given widget configuration.
RemarksUsually, this will create an instance of an IWidgetElement and then call Widget.ReconcileInto to perform the initial reconciliation after that element gets attached to its parent and the panel.

Inherited Members

Extension Methods

ToDiagnosticsNodeSafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTightStretchTightVisibilityWithModifierToBuildableToFactoryDescribeIdentityShortHashToStringNullable

On this page