ValueWithIndex<Value> class

A data structure that wraps a value with its original index from a larger, flat list.

This is useful in grouped lists to maintain a reference to the item's position in the complete, ungrouped dataset, enabling operations like updating or removing the item from the original source.

Annotations

Constructors

ValueWithIndex({required Value value, required int index})
Creates a ValueWithIndex instance.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
index int
The index of the value in the overall flat list.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → Value
The underlying item value.
final

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.
override