appcraft_list_loading_flutter 0.2.0
appcraft_list_loading_flutter: ^0.2.0 copied to clipboard
Dispatcher for paginated list loading with offset/cursor support, debounced search and pluggable cancellation strategies.
appcraft_list_loading_flutter #
0.2.0 #
-
Added: public
R? lastResultgetter onACDispatcher— stores the last successfully loadedRreturned by the loader (the same reference, no defensive copy). Updated after every successfulreload/loadMore; not reset onminLengthrejection, loader/parser exception, orcancel(). Reset tonullbydispose(). Useful for cursor pagination and DTO scenarios where the response carries metadata beyonditems/hasMore— for example, a server-sidenextCursortoken that the consumer feeds into the nextloadMorecall. -
BREAKING CHANGE: all 9 public types renamed — the
ListLoadingprefix was dropped to keep names short. Search/Cancel strategies kept their names (noListLoadingprefix to begin with). No deprecatedtypedefaliases — migrate via find-replace.Old name New name ACListLoadingDispatcherACDispatcherACDefaultListLoadingDispatcherACDefaultDispatcherACCustomListLoadingDispatcherACCustomDispatcherACListLoadingParamsMixinACParamsMixinACOffsetListLoadingParamsMixinACOffsetParamsMixinACListLoadingParserACParserACDefaultListLoadingParserACDefaultParserACResultListLoadingParserACResultParserACListLoadingResultACResult -
BREAKING CHANGE: flat
lib/src/layout. The intermediatelib/src/list_loading_dispatcher/list_loading_dispatcher.dartbarrel was removed; the six implementation files now live directly inlib/src/. The public entry pointlib/appcraft_list_loading_flutter.dartexports them directly. Consumers that import via the public entry are unaffected; deep imports throughlib/src/list_loading_dispatcher/...must be updated tolib/src/.... -
Removed:
ACCursorListLoadingParamsMixin— empty marker mixin not read by the dispatcher. Cursor-style params now declare a plaincursorfield on the params class withACParamsMixin. Carry the next-page cursor between calls throughdispatcher.lastResult?.<your_field>. -
Migration guide:
- Find-replace the 9 type names per the table above.
- Drop
ACCursorListLoadingParamsMixinfrom your params classes; declare a plainString? cursor(or any type) field instead. - (Optional) Use
dispatcher.lastResultto access the raw last loader response — for cursor pagination or DTO metadata. - If you used deep imports (
package:appcraft_list_loading_flutter/src/list_loading_dispatcher/...), either switch to the public entrypackage:appcraft_list_loading_flutter/appcraft_list_loading_flutter.dartor update paths to the flatpackage:appcraft_list_loading_flutter/src/....
0.1.0 #
- BREAKING CHANGE: removed
finalmodifier from public concrete classes, allowing bothextendsandimplementsfor downstream consumers. Affected classes:ACDefaultListLoadingDispatcher,ACCustomListLoadingDispatcher,ACDefaultListLoadingParser,ACResultListLoadingParser,ACDebouncedSearchStrategy,ACOperationCancelStrategy. For consumers that did not rely onfinalguarantees, this is a non-breaking relaxation; no migration is required. - Added "Extending the API" section to README with subclassing example.
- Added inheritance/implementation note to dartdoc of all open classes.
0.0.1 #
- Initial package release.
- Added
ACListLoadingDispatcher<P, R, T>— a dispatcher for paginated list loading with support for offset/cursor pagination, search and cancellation. - Added facade dispatchers
ACDefaultListLoadingDispatcher<P, T>andACCustomListLoadingDispatcher<P, R, T>with pre-configured parsers. - Added parsers
ACListLoadingParser,ACDefaultListLoadingParser,ACResultListLoadingParser. - Added
ACListLoadingResult<T>mixin for response DTOs. - Added parameter mixins
ACListLoadingParamsMixin,ACOffsetListLoadingParamsMixin,ACCursorListLoadingParamsMixin. - Added search strategy
ACSearchStrategywith implementationACDebouncedSearchStrategy(debounce + minLength). - Added cancellation strategy
ACCancelStrategy(contract + implementation based onCancelableOperation).