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

Unified Diff: lib/src/list_path_observer.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/list_path_observer.dart
diff --git a/lib/src/list_path_observer.dart b/lib/src/list_path_observer.dart
index 22a81995989483ad5876c4e2328c05a4f44e3584..ba9d1041ac4c010456ccd1e9cc7aff642f7fcf50 100644
--- a/lib/src/list_path_observer.dart
+++ b/lib/src/list_path_observer.dart
@@ -21,9 +21,7 @@ class ListPathObserver<E, P> extends ChangeNotifier {
bool _scheduled = false;
Iterable<P> _value;
- ListPathObserver(this.list, String path)
- : _itemPath = path {
-
+ ListPathObserver(this.list, String path) : _itemPath = path {
// TODO(jmesserly): delay observation until we are observed.
_sub = list.listChanges.listen((records) {
for (var record in records) {
@@ -47,7 +45,7 @@ class ListPathObserver<E, P> extends ChangeNotifier {
void _reduce() {
_scheduled = false;
var newValue = _observers.map((o) => o.value);
- _value = notifyPropertyChange(#value, _value, newValue);
+ _value = notifyPropertyChange(#value, _value, newValue) as Iterable<P>;
vsm 2016/01/22 16:47:15 Perhaps we need to be more permissive on casts fro
Jennifer Messerly 2016/01/22 17:45:00 generic methods FTW! notifyPropertyChange<T>(
vsm 2016/01/22 18:49:22 Done.
}
void _scheduleReduce(_) {

Powered by Google App Engine
This is Rietveld 408576698