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

Unified Diff: samples/swarm/swarm_ui_lib/observable/observable.dart

Issue 12391046: Add List.asMap(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 10 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 | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/observable/observable.dart
diff --git a/samples/swarm/swarm_ui_lib/observable/observable.dart b/samples/swarm/swarm_ui_lib/observable/observable.dart
index 3711351e9431d2eeb3d12a3b09f453bd0a88c861..e60b8a92ee23585f7eca59833ebcd1a5cb3f3c35 100644
--- a/samples/swarm/swarm_ui_lib/observable/observable.dart
+++ b/samples/swarm/swarm_ui_lib/observable/observable.dart
@@ -306,6 +306,9 @@ class ObservableList<T>
T elementAt(int index) {
return _internal.elementAt(index);
}
+ Map<int, T> asMap() {
+ return IterableMixinWorkaround.asMapList(_internal);
+ }
bool get isEmpty => length == 0;
}
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | sdk/lib/_collection_dev/list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698