rowKeyBuilder property

Key Function(int rowIndex)? rowKeyBuilder
final

Optional key builder that gives each row a stable identity across rebuilds.

When enableRowAnimations is true, providing a key that reflects the underlying data (e.g., a time slot timestamp) lets AnimatedList correctly map old rows to new rows even when their indices shift.

If null, keys are index-based — animations work correctly only for items appended/removed at the end.

Implementation

final Key Function(int rowIndex)? rowKeyBuilder;