EntityDelta<T> class

Represents a set of changes (added, removed, moved, updated) between two lists of entities.

Constructors

EntityDelta({List<T> added = const [], List<T> removed = const [], List<(T, T)> moved = const [], List<(T, T)> updated = const []})
const
EntityDelta.diff(List<T> oldL, List<T> newL, {required Object keySelector(T), required bool hasSpatialChange(T oldItem, T newItem)})
Computes the difference between two lists.
factory

Properties

added List<T>
Items that were added.
final
hasChanged bool
Returns true if any changes occurred.
no setter
hashCode int
The hash code for this object.
no setteroverride
moved List<(T, T)>
Items that moved spatially (old, new).
final
news List<T>
All new items after changes.
no setter
olds List<T>
All old items affected by changes.
no setter
removed List<T>
Items that were removed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updated List<(T, T)>
Items that were updated (non-spatial change) (old, new).
final

Methods

copyWith({List<T>? added, List<T>? removed, List<(T, T)>? moved, List<(T, T)>? updated}) EntityDelta<T>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override