clear method
Removes all objects from this list; the length of the list becomes zero.
Implementation
S clear([TotalCountResolver totalCountResolver = _defaultResolver]) {
return state.copyWith(
items: [],
totalCount:
totalCountResolver(state.totalCount, diff(state.items.length, 0)),
);
}