Skip to content

Commit

Permalink
Revert PropertyChangeMixin (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
matanlurey authored Nov 21, 2016
1 parent d296efa commit 3d1cbce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.17.0+1

* Revert `PropertyChangeMixin`, which does not work in dart2js

## 0.17.0

This is a larger change with a goal of no runtime changes for current
Expand Down
23 changes: 8 additions & 15 deletions lib/src/change_notifier.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,15 @@ class ChangeNotifier<C extends ChangeRecord> implements Observable<C> {
}
}

/// Implements [notifyPropertyChange] for classes that need support.
/// Supplies property `changes` and various hooks to implement [Observable].
///
/// May use `notifyChange` or `notifyPropertyChange` to queue a property change
/// record; they are asynchronously delivered at the end of the VM turn.
///
/// Will be folded entirely into [PropertyChangeNotifier] in the future.
@Deprecated('Exists to make migrations off Observable easier')
abstract class PropertyChangeMixin implements ChangeNotifier {
/// [PropertyChangeNotifier] may be extended or used as a delegate. To use as
/// a mixin, instead use with [PropertyChangeMixin]:
/// with ChangeNotifier<PropertyChangeRecord>, PropertyChangeMixin
class PropertyChangeNotifier extends ChangeNotifier<PropertyChangeRecord> {
@override
/*=T*/ notifyPropertyChange/*<T>*/(
Symbol field,
Expand All @@ -131,14 +135,3 @@ abstract class PropertyChangeMixin implements ChangeNotifier {
return newValue;
}
}

/// Supplies property `changes` and various hooks to implement [Observable].
///
/// May use `notifyChange` or `notifyPropertyChange` to queue a property change
/// record; they are asynchronously delivered at the end of the VM turn.
///
/// [PropertyChangeNotifier] may be extended or used as a delegate. To use as
/// a mixin, instead use with [PropertyChangeMixin]:
/// with ChangeNotifier<PropertyChangeRecord>, PropertyChangeMixin
class PropertyChangeNotifier = ChangeNotifier<PropertyChangeRecord>
with PropertyChangeMixin;
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: observable
version: 0.17.0
version: 0.17.0+1
author: Dart Team <[email protected]>
description: Support for marking objects as observable
homepage: https://github.com/dart-lang/observable
Expand Down

0 comments on commit 3d1cbce

Please sign in to comment.