flutterx_live_data 2.0.1 copy "flutterx_live_data: ^2.0.1" to clipboard
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.endOfFrame from a post-frame callback (for example a LiveDataBuilder whose data changes in addPostFrameCallback or 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.0 and Flutter >=3.41.0.
  • ObservableData implements Listenable and LiveData<T> implements ValueListenable<T>: LiveData works with ValueListenableBuilder, ListenableBuilder and Listenable.merge. Listeners are synchronous and count as active observers. A lazy (non reactive) mediator without a value cannot be read by ValueListenableBuilder: use LiveDataBuilder or reactive: true.
  • Breaking: reading value of an uninitialized data throws StateError in debug and release (it was an assert / LateInitializationError); use valueOrNull or initialized.
  • Breaking: observeForever with a closure already registered on the same data, and addSource with a source already registered (so also a second initialize), throw StateError in debug and release.
  • Breaking: MutableLiveData() without value for a non-nullable T is uninitialized like .late() (it threw).
  • Breaking: for values the last write wins: a direct write (value =, setTo, collection mutators) supersedes a pending postValue/postSetTo, and among posts the last posted wins (it was the last to complete). Errors of posted futures are reported with FlutterError.reportError.
  • Breaking: LiveEvent and MediatorLiveEvent deliver every event in order, also with a dispatcher and with postSend (they kept only the last).
  • Breaking: Dispatcher.postFrame always 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.defaultValue is a getter that throws when absent; new hasInitialValue and readInitialValue; StorageInterface.raw is no longer const.
  • Breaking: HistoryLive* collections have non-null default encode/decode that rebuild the typed collection; HistoryLiveSet/HistoryLiveQueue work without encode.
  • Breaking: LiveList.removeRange/setAll/setRange/fillRange throw the same RangeErrors as List.
  • Disposable.dispose is idempotent and an old handle never removes a newer registration; Disposable is an abstract interface class.
  • An observer removed during a notification is not notified anymore.
  • ImmutableLiveData keeps no global state; the same closure may be registered more than once and removeObserver is a no-op.
  • invalidateSource/invalidateSources rerun the source callback with its current value, also after initialize.
  • ObserverMixin recovers after registerObservers throws; LiveSelectableData.lateInitialize and link no longer fail; whenValue completes once; linkStream checks each event instead of casting the stream.
  • historyReplace with an equal value keeps the entry; a decode failing during undo/redo leaves index and value unchanged.
  • MultipleLiveDataBuilder keeps the right value per source after the sources change, and with2..7 forward key. LiveDataBuilder and MultipleLiveDataBuilder build 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/ and skills/.

Migration from 1.x #

  1. Raise the app to Dart 3.11 / Flutter 3.41 and depend on flutterx_live_data: ^2.0.0.
  2. Code that read value of possibly uninitialized data in release: use valueOrNull or check initialized.
  3. Code that registered the same closure twice, or the same mediator source twice, now gets StateError: register once and keep the Disposable.
  4. Code that relied on LiveEvent collapsing events: it now receives each event.
  5. Code that relied on a pending postValue overriding a later direct write: await the future before writing.
  6. Code that caught StateError from Storage* collections without a stored value: they now start empty.
  7. Dispatcher.postFrame callbacks 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.
14
likes
150
points
422
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Observable data holders inspired by Android LiveData, with lazy activation, mediators, history, storage, observable collections and widget builders.

Repository (GitLab)
View/report issues

License

BSD-3-Clause (license)

Dependencies

collection, flutter

More

Packages that depend on flutterx_live_data