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

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: Removed inferrable type param 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
« no previous file with comments | « lib/src/list_diff.dart ('k') | lib/src/metadata.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..36764a4da00d81822d3d10eacf8fbc02de761748 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) {
@@ -46,7 +44,7 @@ class ListPathObserver<E, P> extends ChangeNotifier {
void _reduce() {
_scheduled = false;
- var newValue = _observers.map((o) => o.value);
+ var newValue = _observers.map((o) => o.value as P);
_value = notifyPropertyChange(#value, _value, newValue);
}
« no previous file with comments | « lib/src/list_diff.dart ('k') | lib/src/metadata.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698