AnimatedListDiffDispatcher<T> class
This class takes a initial list that can be replaced with a new one via the dispatchNewList method. When a new list is provided, the Myers algorithm runs in a separated Isolate to detect the differences. These differences will be dispatched to the animatedListController provided. An itemBuilder has to be provided to build replaced and changed items (as required by AnimatedListController.notifyChangedRange, AnimatedListController.notifyReplacedRange and AnimatedListController.notifyRemovedRange methods). The two lists are compared using the AnimatedListDiffComparator provided.
The current list to be passed to the AnimatedSliverList can be retrieved by the currentList getter.
- Implementers
Constructors
-
AnimatedListDiffDispatcher({@required AnimatedListController animatedListController, @required AnimatedListDiffItemBuilder<
T> itemBuilder, @required AnimatedListDiffComparator<T> comparator, @required T initialList})
Properties
- animatedListController → AnimatedListController
-
final
-
comparator
→ AnimatedListDiffComparator<
T> -
final
- currentList → T
-
Returns the current list to be passed to the AnimatedSliverList.
read-only
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
itemBuilder
→ AnimatedListDiffItemBuilder<
T> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
dispatchNewList(
T newList) → void - Replaces the current list with the new one. Differences are calculated and then dispatched to the coontroller.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited