observable
Support for marking objects as observable
0.24.0
17K downloads/mo
#2343 most downloaded on pub.dev
google/observable
What this package is like to depend on
Last release 5 years ago
no release in 18 months
Ships unpredictably
gaps range from 1 weeks to 2.1 years
Most releases are documented
notes for 28 of 36 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
36 releases · first in 2014
0 releases in the last 12 months
see the full history below
Release timeline
36 releases · Jun 2014 to Dec 2021Releases
latest 36-
0.24.001 Dec 2021Release notes
Open source →- Migrate to null safety.
- Fix issue where
ObservableMapdid not notify for all methods.
-
0.23.023 Mar 2021Release notes
Open source →- Support latest dependencies.
- Reintroduce custom equality for
PropertyChangeRecordfrom 0.18.0.
-
0.22.205 Feb 2019Release notes
Open source →- Add
toObservableListandtoObservableMap, better typed versions oftoObservable.
- Add
-
0.22.123 Mar 2018Release notes
Open source →0.22.1
-
Added
ObservableList.castFrom, similar toList.castFrom. -
Changed
ObservableList'scastandretypefunction to create a forwarding
instance ofObservableListinstead of an instance ofList.
Release notes
Open source →-
Added
ObservableList.castFrom, similar toList.castFrom. -
Changed
ObservableList'scastandretypefunction to create a forwarding instance ofObservableListinstead of an instance ofList.
-
-
0.22.1+103 May 2018 -
0.22.1+218 May 2018 -
0.22.1+325 May 2018Release notes
Open source →Update implementations of the
cast()and the deprecatedretype()methods.- The
retype()method on List and Map is deprecated and will be removed. - The
cast()method should do what theretype()method did.
Release notes
Open source →Update implementations of the
cast()and the deprecatedretype()methods.- The
retype()method on List and Map is deprecated and will be removed. - The
cast()method should do what theretype()method did.
- The
-
0.22.1+423 Jul 2018Release notes
Open source →-
Support Dart 2 stable.
-
Bump and widen dev dependencies on build packages.
-
-
0.22.1+510 Dec 2018Release notes
Open source →Fix generic type error that occurs when using ChangeNotifier with a subclass of
ChangeRecord. Previously, callingnotifyChanges()on
class Foo with ChangeNotifier<CustomChangeRecord> {}would throw a type error.
Now, thechangesstream emits a customChangeRecordsclass that implements
theListinterface. This change is backwards compatible.Release notes
Open source →Fix generic type error that occurs when using ChangeNotifier with a subclass of ChangeRecord. Previously, calling
notifyChanges()onclass Foo with ChangeNotifier<CustomChangeRecord> {}would throw a type error. Now, thechangesstream emits a customChangeRecordsclass that implements theListinterface. This change is backwards compatible. -
0.22.019 Mar 2018Release notes
Open source →-
Added
ObservableMap.castFrom, similar toMap.castFrom. -
Fixed a bug where
ObservableMap'scastandretypefunction would create a new empty instance instead of a forwarding instance.
-
-
0.21.313 Mar 2018Release notes
Open source →- Support Dart 2 collection methods where previously threw
UnimplementedError.
- Support Dart 2 collection methods where previously threw
-
0.21.207 Mar 2018Release notes
Open source →- Fix
toObservable(deep: false)to be shallow again. - Remove use of
Maps, for better compatibility with Dart 2.
- Fix
-
0.21.101 Mar 2018Release notes
Open source →- Updated one test to comply with Dart 2 voidness semantics.
- Fix Dart 2 runtime cast failure in
toObservable(). - Loosen
ObservableList.from()to takeIterable, notIterable<T>. This matchesList.from()and avoids some unnecessary cast failures.
-
0.21.012 Feb 2018Release notes
Open source →Breaking Changes
Version 0.21.0 reverts to version 0.17.0+1 with fixes to support Dart 2. Versions 0.18, 0.19, and 0.20 were not used by the package authors and effectively unsupported. This resolves the fork that happened at version 0.18 and development can now be supported by the authors.
Reverted Changes
(From 0.20.1)
- Revert add
Observable<List|Set|Map>.unmodifiablefor immutable collections - Revert add
Observable<List|Set|Map>.EMPTYfor empty immutable collections- This can be used as an optimization for libraries that always need to return an observable collection, but don't want to allocate a new instance to represent an empty immutable.
(From 0.20.0)
- Revert add
ObservableSet,SetChangeRecord, andSetDiffer
(From 0.19.0)
- Revert refactor and deprecate
ObservableMap-specific APIObservableMapno longer emits#keysand#valueschange recordsObservableMap.spyis deprecated, becomes.delegateinstead
- Revert Potentially breaking:
ObservableMapmay no longer be extended
Revert considered deprecated to be notified of
lengthchanges.(From 0.18.0)
- Revert refactor and deprecate
ObservableList-specific APIObservableList.applyChangeRecordsObservableList.calculateChangeRecordsObservableList.withLengthObservableList.deliverListChangesObservableList.discardListChangesObservableList.hasListChangesObservableList.listChangesObservableList.notifyListChange
- Revert potentially breaking:
ObservableListmay no longer be extended
Revert considered deprecated to be notified of
length,isEmptyandisNotEmptyPropertyChangeRecords onObservableListChanges Applied on top of version 0.17.0+1
(With internal change numbers)
- Flip deliverChanges from
@protectedto@visibleForTesting. cl/147029982 - Fix a typing bug in observable when running with DDC:
ChangeRecord.NONEcreates aList<ChangeRecord>, while the call sites expect aList<ListChangeRecord>orList<MapChangeRecord>, respectively. cl/155201160 - Fix
Observable._isNotGenericcheck. cl/162282107 - Fix issue with type in deliverChanges. cl/162493576
- Stop using the comment syntax for generics. cl/163224019
- Fix ListChangeRecord's added getter. Add checks for the added and removed getters in listChangeTests. cl/169261086.
- Migrate observable to real generic method syntax. cl/170239122
- Fix only USES_DYNAMIC_AS_BOTTOM error in observable. cl/179946618
- Cherry pick https://github.com/dart-lang/observable/pull/46.
- Stub out Dart 2 core lib changes in ObservableMap.
- Removed
Observable{List|Map}.NONE(not Dart2 compatible). - Fix issue with type in
ObservableList._notifyListChange. cl/182284033
- Revert add
-
0.20.425 Feb 2017 -
0.20.4+104 Apr 2017 -
0.20.4+227 Dec 2017Release notes
Open source →- Support the latest release of
pkg/quiver(0.26). - Bug fix: Some minor type fixes for strict runtimes (and Dart 2.0), namely:
- PropertyChangeNotifier merely
extends ChangeNotifierrather thanextends ChangeNotifier<PropertyChangeRecord>. - Introduce new
ListChangeRecord.NONEandMapChangeRecord.NONE.
- PropertyChangeNotifier merely
- Support the latest release of
-
0.20.4+309 Jan 2018 -
0.20.220 Dec 2016Release notes
Open source →- Bug fix: Avoid emitting a no-op
MapChangeRecord - Bug fix: Restore
ObservableList.discardListChangesfunctionality
- Bug fix: Avoid emitting a no-op
-
0.20.129 Nov 2016Release notes
Open source →- Add
Observable<List|Set|Map>.unmodifiablefor immutable collections - Add
Observable<List|Set|Map>.EMPTYfor empty immutable collections- This can be used as an optimization for libraries that always need to return an observable collection, but don't want to allocate a new instance to represent an empty immutable.
- Add
-
0.19.023 Nov 2016Release notes
Open source →- Refactor and deprecate
ObservableMap-specific APIObservableMapno longer emits#keysand#valueschange recordsObservableMap.spyis deprecated, becomes.delegateinstead
- Potentially breaking:
ObservableMapmay no longer be extended
It is also considered deprecated to be notified of
lengthchanges. - Refactor and deprecate
-
0.18.122 Nov 2016 -
0.18.022 Nov 2016Release notes
Open source →- Refactor and deprecate
ObservableList-specific APIObservableList.applyChangeRecordsObservableList.calculateChangeRecordsObservableList.withLengthObservableList.deliverListChangesObservableList.discardListChangesObservableList.hasListChangesObservableList.listChangesObservableList.notifyListChange
- Potentially breaking:
ObservableListmay no longer be extended
It is also considered deprecated to be notified of
length,isEmptyandisNotEmptyPropertyChangeRecords onObservableList- in a future releaseObservableList.changeswill beStream<List<ListChangeRecord>>. - Refactor and deprecate
-
0.17.017 Nov 2016Release notes
Open source →This is a larger change with a goal of no runtime changes for current customers, but in the future
Observablewill become a very lightweight interface, i.e.:abstract class Observable<C extends ChangeRecord> { Stream<List<C>> get changes; }- Started deprecating the wide
ObservableinterfaceChangeNotifiershould be used as a base class for these methods:Observable.observedObservable.unobservedObservable.hasObserversObservable.deliverChangesObservable.notifyChange
PropertyChangeNotifiershould be used for these methods:Observable.notifyPropertyChange
- Temporarily,
ObservableusesChangeNotifier- Existing users of anything but
implements Observableshould move to implementing or extendingChangeNotifier. In a future releaseObservablewill reduce API surface down to an abstractStream<List<C>> get changes.
- Existing users of anything but
- Added the
ChangeNotifierandPropertyChangeNotifierclasses- Can be used to implement
Observablein a generic manner
- Can be used to implement
- Observable is now
Observable<C extends ChangeRecord>- When passing a generic type
C,notifyPropertyChangeis illegal
- When passing a generic type
- Started deprecating the wide
-
0.17.0+121 Nov 2016 -
0.16.017 Nov 2016Release notes
Open source →- Refactored
MapChangeRecord- Added equality and hashCode checks
- Added
MapChangeRecord.applyto apply a change record
- Added
MapDiffer, which implementsDifferfor aMap
- Refactored
-
0.15.0+117 Nov 2016 -
0.14.023 Sep 2016Nothing published for this version
-
0.14.0+126 Sep 2016 -
0.1.611 Jun 2014Nothing published for this version
-
0.1.511 Jun 2014Nothing published for this version
-
0.1.408 Jun 2014Nothing published for this version
-
0.1.308 Jun 2014Nothing published for this version
-
0.1.206 Jun 2014Nothing published for this version
-
0.1.106 Jun 2014Nothing published for this version
-
0.1.006 Jun 2014Nothing published for this version