clearItems method
Clears all items from the list.
Implementation
@override
void clearItems() {
final currentState = state;
if (currentState is! SmartPaginationLoaded<T>) return;
_pages.clear();
_onClear?.call();
emit(
currentState.copyWith(
allItems: <T>[],
items: <T>[],
hasReachedEnd: true,
lastUpdate: DateTime.now(),
),
);
}