list_diff library

Classes

Operation<Item>
A single operation on a list – either an insertion or deletion of an item at an index.

Extensions

ApplyOperation on List<T>

Functions

diff<Item>(List<Item> oldList, List<Item> newList, {bool? spawnIsolate, EqualityChecker<Item>? areEqual, HashCodeGetter<Item>? getHashCode}) Future<List<Operation<Item>>>
Calculates a minimal list of Operations that convert the oldList into the newList.
diffSync<Item>(List<Item> oldList, List<Item> newList, {EqualityChecker<Item>? areEqual}) List<Operation<Item>>
Calculates a minimal list of Operations that convert the oldList into the newList.

Typedefs

EqualityChecker<Item> = bool Function(Item a, Item b)
HashCodeGetter<Item> = int Function(Item a)