ListDiffDelegate<T> class

Implemented types

Constructors

ListDiffDelegate(List<T> oldList, List<T> newList, [bool equalityChecker(T, T)?])

Properties

equalityChecker bool Function(T, T)
final
hashCode int
The hash code for this object.
no setterinherited
newList List<T>
final
oldList List<T>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

areContentsTheSame(int oldItemPosition, int newItemPosition) bool
Called by the DiffUtil when it wants to check whether two items have the same data. DiffUtil uses this information to detect if the contents of an item has changed.
override
areItemsTheSame(int oldItemPosition, int newItemPosition) bool
Called by the DiffUtil to decide whether two object represent the same Item.
override
getChangePayload(int oldItemPosition, int newItemPosition) Object?
When areItemsTheSame(int, int) returns true for two items and areContentsTheSame(int, int) returns false for them, DiffUtil calls this method to get a payload about the change.
override
getNewItemAtIndex(int index) → T
override
getNewListSize() int
Returns the size of the new list.
override
getOldItemAtIndex(int index) → T
override
getOldListSize() int
Returns the size of the old list.
override
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.
inherited