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

Unified Diff: sky/sdk/lib/framework/fn2.dart

Issue 1172503004: Enable setting the UINode key for ParentDataNodes (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « sky/sdk/lib/framework/components2/menu_item.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/framework/fn2.dart
diff --git a/sky/sdk/lib/framework/fn2.dart b/sky/sdk/lib/framework/fn2.dart
index 9ca123fcf61108d89ec67221dad9ca66b7e1672d..931d4f379ef132c2c3b0674c41fdf6c509439528 100644
--- a/sky/sdk/lib/framework/fn2.dart
+++ b/sky/sdk/lib/framework/fn2.dart
@@ -154,7 +154,7 @@ abstract class UINode {
abstract class ContentNode extends UINode {
UINode content;
- ContentNode(UINode content) : this.content = content, super(key: content._key);
+ ContentNode(UINode content, { Object key }) : this.content = content, super(key: key);
void _sync(UINode old, dynamic slot) {
UINode oldContent = old == null ? null : (old as ContentNode).content;
@@ -173,7 +173,7 @@ abstract class ContentNode extends UINode {
class ParentDataNode extends ContentNode {
final ParentData parentData;
- ParentDataNode(UINode content, this.parentData): super(content);
+ ParentDataNode(UINode content, this.parentData, { Object key }): super(content, key: key);
}
typedef void GestureEventListener(sky.GestureEvent e);
@@ -754,8 +754,8 @@ class FlexContainer extends MultiChildRenderObjectWrapper {
}
class FlexExpandingChild extends ParentDataNode {
- FlexExpandingChild(UINode content, [int flex = 1])
- : super(content, new FlexBoxParentData()..flex = flex);
+ FlexExpandingChild(UINode content, { int flex: 1, Object key })
+ : super(content, new FlexBoxParentData()..flex = flex, key: key);
}
class Image extends RenderObjectWrapper {
« no previous file with comments | « sky/sdk/lib/framework/components2/menu_item.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698