when<T> abstract method
T
when<T>({})
call one of the given callback functions depending on the type of this object.
@param insert callback function to be called if this object is of type Insert @param remove callback function to be called if this object is of type Remove @param change callback function to be called if this object is of type Change @param move callback function to be called if this object is of type Move
Implementation
T when<T>({
required T Function(int position, int count) insert,
required T Function(int position, int count) remove,
required T Function(int position, Object? payload) change,
required T Function(int from, int to) move,
});