Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: lib/src/change_notifier.dart

Issue 1616953004: Fixed strong mode errors and warnings reachable from lib/observe.dart (Closed) Base URL: https://github.com/dart-lang/observe.git@master
Patch Set: Reformat Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/change_notifier.dart
diff --git a/lib/src/change_notifier.dart b/lib/src/change_notifier.dart
index 7febee562809dcce54d0840be77a964226a4600b..69b0a03d63dcad09066dc616e7c957970ef7b493 100644
--- a/lib/src/change_notifier.dart
+++ b/lib/src/change_notifier.dart
@@ -16,13 +16,13 @@ import 'package:observe/src/observable.dart' show notifyPropertyChangeHelper;
/// When a field, property, or indexable item is changed, a derived class should
/// call [notifyPropertyChange]. See that method for an example.
abstract class ChangeNotifier implements Observable {
- StreamController _changes;
+ StreamController<List<ChangeRecord>> _changes;
List<ChangeRecord> _records;
Stream<List<ChangeRecord>> get changes {
if (_changes == null) {
- _changes = new StreamController.broadcast(sync: true,
- onListen: observed, onCancel: unobserved);
+ _changes = new StreamController.broadcast(
+ sync: true, onListen: observed, onCancel: unobserved);
}
return _changes.stream;
}
@@ -66,8 +66,8 @@ abstract class ChangeNotifier implements Observable {
/// @reflectable set myField(value) {
/// _myField = notifyPropertyChange(#myField, _myField, value);
/// }
- notifyPropertyChange(Symbol field, Object oldValue, Object newValue)
- => notifyPropertyChangeHelper(this, field, oldValue, newValue);
+ notifyPropertyChange(Symbol field, Object oldValue, Object newValue) =>
+ notifyPropertyChangeHelper(this, field, oldValue, newValue);
void notifyChange(ChangeRecord record) {
if (!hasObservers) return;
« no previous file with comments | « lib/src/bind_property.dart ('k') | lib/src/change_record.dart » ('j') | lib/src/list_diff.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698