filterPaginatedList method
Implementation
void filterPaginatedList(String searchTerm) {
if (state is PaginationLoaded) {
final loadedState = state as PaginationLoaded;
final filteredList = loadedState.documentSnapshots
.where((document) => document
.data()
.toString()
.toLowerCase()
.contains(searchTerm.toLowerCase()))
.toList();
emit(loadedState.copyWith(
documentSnapshots: filteredList,
hasReachedEnd: loadedState.hasReachedEnd,
));
}
}