when<T> method
T
when<T>({
- T insert()?,
- required T remove(),
- T change()?,
- T move()?,
override
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
@override
T when<T>(
{T Function(int p1, int p2)? insert,
required T Function(int p1, int p2) remove,
T Function(int p1, Object p2)? change,
T Function(int p1, int p2)? move}) {
return remove(position, count);
}