flutterx_live_data 2.0.1
flutterx_live_data: ^2.0.1 copied to clipboard
Observable data holders inspired by Android LiveData, with lazy activation, mediators, history, storage, observable collections and widget builders.
2.0.1 #
- Fixed: a change posted with
Dispatcher.endOfFramefrom a post-frame callback (for example aLiveDataBuilderwhose data changes inaddPostFrameCallbackor in a size callback) was delivered only when something else scheduled a frame; the dispatcher now schedules it.
2.0.0 #
Major release on Dart 3.11 / Flutter 3.41: interoperability with the Flutter SDK, many fixes to registration, posting and history, a new folder layout. Public names are unchanged.
- Breaking: requires Dart
^3.11.0and Flutter>=3.41.0. ObservableDataimplementsListenableandLiveData<T>implementsValueListenable<T>: LiveData works withValueListenableBuilder,ListenableBuilderandListenable.merge. Listeners are synchronous and count as active observers. A lazy (nonreactive) mediator without a value cannot be read byValueListenableBuilder: useLiveDataBuilderorreactive: true.- Breaking: reading
valueof an uninitialized data throwsStateErrorin debug and release (it was an assert /LateInitializationError); usevalueOrNullorinitialized. - Breaking:
observeForeverwith a closure already registered on the same data, andaddSourcewith a source already registered (so also a secondinitialize), throwStateErrorin debug and release. - Breaking:
MutableLiveData()withoutvaluefor a non-nullableTis uninitialized like.late()(it threw). - Breaking: for values the last write wins: a direct write (
value =,setTo, collection mutators) supersedes a pendingpostValue/postSetTo, and among posts the last posted wins (it was the last to complete). Errors of posted futures are reported withFlutterError.reportError. - Breaking:
LiveEventandMediatorLiveEventdeliver every event in order, also with a dispatcher and withpostSend(they kept only the last). - Breaking:
Dispatcher.postFramealways runs after a frame, scheduling one if needed (it ran synchronously outside a frame). - Breaking: storage: an empty, missing or undecodable stored value with no default leaves the data uninitialized
(collections start empty) instead of throwing; an undecodable value is reported with
FlutterError.reportError.StorageInterface.defaultValueis a getter that throws when absent; newhasInitialValueandreadInitialValue;StorageInterface.rawis no longerconst. - Breaking:
HistoryLive*collections have non-null defaultencode/decodethat rebuild the typed collection;HistoryLiveSet/HistoryLiveQueuework withoutencode. - Breaking:
LiveList.removeRange/setAll/setRange/fillRangethrow the sameRangeErrors asList. Disposable.disposeis idempotent and an old handle never removes a newer registration;Disposableis anabstract interface class.- An observer removed during a notification is not notified anymore.
ImmutableLiveDatakeeps no global state; the same closure may be registered more than once andremoveObserveris a no-op.invalidateSource/invalidateSourcesrerun the source callback with its current value, also afterinitialize.ObserverMixinrecovers afterregisterObserversthrows;LiveSelectableData.lateInitializeandlinkno longer fail;whenValuecompletes once;linkStreamchecks each event instead of casting the stream.historyReplacewith an equal value keeps the entry; adecodefailing during undo/redo leaves index and value unchanged.MultipleLiveDataBuilderkeeps the right value per source after the sources change, andwith2..7forwardkey.LiveDataBuilderandMultipleLiveDataBuilderbuild with the current value and rebuild once per change.- A non reactive mediator that loses its last observer ignores asynchronous transforms still in flight.
- Integration skills for Claude Code in
.claude-plugin/andskills/.
Migration from 1.x #
- Raise the app to Dart 3.11 / Flutter 3.41 and depend on
flutterx_live_data: ^2.0.0. - Code that read
valueof possibly uninitialized data in release: usevalueOrNullor checkinitialized. - Code that registered the same closure twice, or the same mediator source twice, now gets
StateError: register once and keep theDisposable. - Code that relied on
LiveEventcollapsing events: it now receives each event. - Code that relied on a pending
postValueoverriding a later direct write: await the future before writing. - Code that caught
StateErrorfromStorage*collections without a stored value: they now start empty. Dispatcher.postFramecallbacks that relied on running immediately outside a frame: call the action directly.
1.9.9 #
- Add LiveSelectableData
1.9.8 #
- Add extensions
1.9.7 #
- Add linkStream
1.9.6 #
- Fixes
1.9.3 #
- Improve LiveResult
1.9.2 #
- Fix HistoryMixin regression
1.9.0 #
- Fix LiveEvent regression
1.8.8 #
- Fix MediatorMutableLiveData.copy
1.8.7 #
- Move reactive field of MediatorMixin to constructor parameter
1.8.6 #
- Fix MultipleLiveDataBuilder & CombinedLiveDataBuilder
1.8.3 #
- Add invalidateSource methods
1.8.2 #
- StateObserver now registers in didChangeDependencies
1.8.1 #
- Fix LiveMap operator
1.8.0 #
- Refactoring
1.7.5 #
- Improve LiveResult
1.7.4 #
- Improve MultipleLiveDataBuilder
1.7.2 #
- Improve HistoryMixin
1.7.1 #
- Add initialize extension
1.7.0 #
- Improve storage collections
1.6.93 #
- Add update method for LiveCollections
1.6.92 #
- Improve HistoryMixin
1.6.9 #
- Improve HistoryMixin
1.6.8 #
- Improve HistoryMixin
1.6.7 #
- Improve keyed live data
1.6.6 #
- Improve dispatchers
1.6.5 #
- Fix state observer
1.6.1 #
- Restore observe function
1.6.0 #
- Fixes
1.5.9 #
- Code improvements
1.5.8 #
- Fix KeyedLiveDataBuilder
1.5.7 #
- Fix KeyedLiveDataBuilder, extensions improvements
1.5.6 #
- Improvements, Add KeyedLiveDataBuilder and LazyLiveData
1.5.5 #
- Improve live widgets, Added MultipleLiveDataBuilder
1.5.4 #
- Improve whenValue extension
1.5.3 #
- Add valueOrNull getter to LiveData
1.5.2 #
- Fix onChanged
1.5.1 #
- Sources improvements
1.5.0 #
- Fix addTransformSource4
1.4.9 #
- Add Dispatcher parameter in StateObserver methods
1.4.8 #
- Performance improvements
1.4.7 #
- Check equality in LiveCollection setTo
1.4.6 #
- Improve StateObserver
1.4.5 #
- Improve StateObserver
1.4.4 #
- Bug fixing
1.4.3 #
- Expose mixin methods
1.4.2 #
- Add Queue collection, mixin refactoring
1.4.1 #
- Flutter type cast bug fix
1.4.0 #
- Refactoring, add documentation
1.3.6 #
- LiveDataBuilder performance improvement
1.3.5 #
- Fix storage live collection with default value
1.3.4 #
- Expose default value from storage mixin
1.3.3 #
- Improve storage live data
1.3.2 #
- Add enum support
1.3.1 #
- Improve multiple live data observer
1.3.0 #
- Improvements
1.2.12 #
- Switched to flutter channel stable
1.2.11 #
- Add LiveResult
1.2.10 #
- Add sources to SelfLiveData
1.2.9 #
- Add ImmutableLiveData
1.2.8 #
- Improve StateObserver
1.2.7 #
- Fix CombinedLiveData placeholder
1.2.6 #
- Code improvements
1.2.5 #
- Add StorageMutableLiveData constructor for json object
1.2.4 #
- Add onTimeOut for awaiting LiveData
1.2.3 #
- Add utility function
1.2.2 #
- Add async support
1.2.1 #
- Improvements
1.2.0 #
- Improvements
1.1.9-dev #
- Fix state observer on uninitialized source
1.1.8-dev #
- Improvements
1.1.7-dev #
- Improvements
1.1.6-dev #
- Add storage mutable live data constructors
1.1.5-dev #
- Fix mediator live data on uninitialized source
1.1.4-dev #
- Fix StorageLiveData default encode/decode
1.1.3-dev #
- Improve code style
1.1.2-dev #
- Add StorageLiveData
1.1.1-dev #
- Improve flutterx live data
1.1.0 #
- Initial stable release
1.0.9-dev #
- Fixes.
1.0.8-dev #
- Fixes.
1.0.7-dev #
- Improve Widgets integration.
1.0.6-dev #
- Improve postInvalidate integration.
1.0.5-dev #
- Add postInvalidate function.
1.0.4-dev #
- Fixes.
1.0.3-dev #
- Add initialization management.
1.0.2-dev #
- Update dependencies.
1.0.1-dev #
- Added example project.
1.0.0-dev #
- Initial release.