ItemRef class final

Placeholder passed into ListView(itemBuilder: (item) => ...).

Use ItemRef()['field'] to read typed list-item fields inside repeated widget builders. Use ItemRef().index to get the zero-based iteration index.

Inheritance
Annotations
  • @immutable

Constructors

ItemRef()
const

Properties

hashCode int
The hash code for this object.
no setterinherited
index ItemIndex
The zero-based index of this item in the list.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String field) FieldAccess
inherited