AnimatedListDiffComparator<T> class

A callback function-based version of AnimatedListDiffBaseComparator, useful if you are bored of creating a new derivated class.

Inheritance

Constructors

AnimatedListDiffComparator({required bool sameItem(T listA, int indexA, T listB, int indexB), required bool sameContent(T listA, int indexA, T listB, int indexB), required int lengthOf(T list)})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

lengthOf(T list) int
It returns the length of the list.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sameContent(T listA, int indexA, T listB, int indexB) bool
IT compares the indexA of listA with the indexB of listB and returns true is they have the same content. This method is called after sameItem returned true, so this method tells if the same item has changed its content; if so a changing notification will be sent to the AnimatedListController.
override
sameItem(T listA, int indexA, T listB, int indexB) bool
It compares the indexA of the listA with the indexB of the listB and returns true is they are the same item. Usually, the "id" of the item is compared here.
override
toString() String
A string representation of this object.
inherited

Operators

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