ListView class
Creates a scrollable, linear array of widgets from an explicit List.
Constructors
-
ListView({Key? key, String? style, String? classAttribute, LayoutType layoutType = LayoutType.contain, Axis scrollDirection = Axis.vertical, required List<
Widget> children}) -
const
- ListView.builder({Key? key, String? style, String? classAttribute, LayoutType layoutType = LayoutType.contain, Axis scrollDirection = Axis.vertical, int? itemCount, required IndexedWidgetBuilder? itemBuilder})
-
Creates a scrollable, linear array of widgets that are created on demand.
const
Properties
-
children
→ List<
Widget> -
Child widgets(will be built all at once).
final
- classAttribute → String?
-
The classes attribute specifies one or more class names for dom node.
final
- correspondingTag → DomTagType
-
Corresponding HTML tag to use to render this widget
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isListViewBuilder → bool
-
Whether list is a Lazy builder.
final
- itemBuilder → IndexedWidgetBuilder?
-
final
- itemCount → int?
-
final
- key → Key?
-
Keys help Rad identify which widgets have changed, are added, or are
removed when a widget has multiple sibling widgets.
finalinherited
- layoutType → LayoutType
-
Type of list view layout.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDirection → Axis
-
Scroll direction of ListView.
final
- style → String?
-
The style attribute for inline CSS.
final
-
widgetCaptureEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in capturing phase.
no setterinherited
-
widgetEventListeners
→ Map<
DomEventType, EventCallback?> -
Events that this widget is listening to in bubbling phase.
no setterinherited
Methods
-
createRenderElement(
RenderElement parent) → RenderElement -
Create element for current widget.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldUpdateWidget(
covariant ListView oldWidget) → bool -
Whether to update current widget.
override
-
shouldUpdateWidgetChildren(
Widget oldWidget, bool shouldUpdateWidget) → bool -
Whether to update current widget's children.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited