list_smith 1.0.0
list_smith: ^1.0.0 copied to clipboard
A developer-first Flutter package that wraps ListView.builder for real-world lists: async pagination, pull-to-refresh, and sync-or-async search.
1.0.0 - 2026-09-11 #
Added #
- [#23] Add ListSmithController to refresh an async list from code (a button, a tab re-tap)
- [#59] ListSmithController gains invalidate(), which re-reads every loaded page in place, and reset(), which starts over from page one. Both report FetchTrigger.invalidated.
Changed #
- [#45] BREAKING: fetch closures take one PageRequest, or SearchPageRequest when searching, instead of positional arguments. The old arguments are the request fields under the same names: pageIndex, pageSize, previousSignal, plus query on a search. Watch your interpolations, "$pageIndex" becomes "${request.pageIndex}".
- [#59] BREAKING: ListSmithObserver.onRefresh() is now onReload(FetchTrigger trigger), and it fires for every reload the engine starts, not just a pull. Rename your override.
- [#59] BREAKING: EmptyPageContext.moreAvailable is now isMoreAvailable. Only a custom EmptyPageBehaviour reads it.
- BREAKING: the SDK floor is now Dart 3.13 and Flutter 3.47, up from Dart 3.12 and Flutter 3.44.
- [#37] Grouping: one header for a group that straddles a page boundary, in release too
Fixed #
- [#35] Drop the in-flight fetch when the paging state is swapped wholesale
- [#60] KeepCachePolicy: a refresh, invalidate() or reset() while searching now reaches the kept feed
0.1.1 - 2026-07-20 #
Added #
- [#28] Add a depth-preserving pull-to-refresh strategy (ReloadToCurrentDepth)
- [#25] SyncSearchPredicates: ready-made sync-search predicate builders. fields (contains), prefix (starts-with), exact (equals), allTerms (multi-word AND), and any/every to combine predicates.
Fixed #
- [#26] Add EmptyPageBehaviour to page past empty pages
0.1.0 - 2026-07-19 #
Added #
- [#7] groupBy + groupByHeaderBuilder
- [#5] Android verified
- [#1] ExplicitHasMorePolicy: end pagination when the fetcher reports hasMore is false, so a trailing empty page is never fetched to find the end.
- [#1] PageFetcher.withSignal and SearchPageFetcher.withSignal: return (items, signal) to report an end signal (a hasMore flag or a next-cursor) to the end policy.
- [#1] Implement your own PaginationEndPolicy over EndContext for custom end-detection, e.g. stop on a short last page or a null next-cursor.
- [#14] Cursor-driven pagination: PageFetcher.withSignal and SearchPageFetcher.withSignal now receive the previous page's signal as previousSignal, so a cursor source drives the next fetch from the cursor the previous page returned.
- [#14] StopOnNullSignalPolicy: end pagination when the fetcher returns a null cursor (the cursor-paging counterpart to ExplicitHasMorePolicy).
- [#14] PaginationEndPolicy.requiresSignal: a policy declares whether it reads the fetcher's end signal, so a signal-reporting fetcher is required at construction.
Changed #
- [#4] Verify regression + Bump python versions
- [#1] BREAKING: PageFetcher and SearchPageFetcher are now classes, not function typedefs. Wrap your fetch function, e.g. fetchPage: PageFetcher((pageIndex, pageSize) => ...).
- [#1] PaginationEndPolicy is now an open interface: end-detection is a public hasReachedEnd(EndContext), previously an internal resolver over per-page counts.
- [#16] Grouping polymorphic dispatch
- [#3] BREAKING: pull-to-refresh is now the refresh: seam (PullToRefresh default, NoRefresh to disable), replacing the pullToRefresh bool. Migrate pullToRefresh: false to refresh: NoRefresh().
- [#3] BREAKING: the custom pull-to-refresh indicator moved from AsyncListSurfaces.refreshBuilder to PullToRefresh(refreshBuilder:). Migrate surfaces: AsyncListSurfaces(refreshBuilder: fn) to refresh: PullToRefresh(refreshBuilder: fn).
- [#3] BREAKING: async search is now the search: seam (AsyncSearch(fetchPage:, cachePolicy:), default NoSearch), replacing searchFetchPage and searchCachePolicy. Migrate searchFetchPage: fn, searchCachePolicy: p to search: AsyncSearch(fetchPage: fn, cachePolicy: p).
Fixed #
- [#2] keep pagination alive past an all-duplicate page
0.0.1 - 2026-07-15 #
Added #
ListSmith.async: async pagination and pull-to-refresh over a page fetcher, with neutral, overridable widgets-layer surfaces.ListSmith.sync: client-side search over an in-memory list via a search predicate.- Async two-view search via
searchFetchPage, with a sealedSearchCachePolicy(ReplaceCachePolicydefault,KeepCachePolicy). - Swappable pagination end-detection:
StopOnEmptyPagesPolicy(default) andFixedPageCountPolicy. - Opt-in
itemIdde-duplication for items repeated across overlapping pages. - Lifecycle observer
ListSmithObserver(andLoggingListSmithObserver) for page-load, error, refresh, and search events.
