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

Side by Side Diff: sky/sdk/lib/framework/components2/ink_well.dart

Issue 1177483004: Change how we narrow the "root" type on RenderObjectWrappers. (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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../animation/animated_value.dart'; 5 import '../animation/animated_value.dart';
6 import '../animation/curves.dart'; 6 import '../animation/curves.dart';
7 import '../fn2.dart'; 7 import '../fn2.dart';
8 import '../rendering/box.dart'; 8 import '../rendering/box.dart';
9 import '../rendering/flex.dart'; 9 import '../rendering/flex.dart';
10 import '../rendering/object.dart'; 10 import '../rendering/object.dart';
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 canvas.restore(); 98 canvas.restore();
99 } 99 }
100 super.paint(canvas); 100 super.paint(canvas);
101 } 101 }
102 } 102 }
103 103
104 class InkWellWrapper extends OneChildRenderObjectWrapper { 104 class InkWellWrapper extends OneChildRenderObjectWrapper {
105 InkWellWrapper({ UINode child, Object key }) 105 InkWellWrapper({ UINode child, Object key })
106 : super(child: child, key: key); 106 : super(child: child, key: key);
107 107
108 RenderInkWell root; 108 RenderInkWell get root => super.root as RenderInkWell;
109 109
110 RenderInkWell createNode() => new RenderInkWell(); 110 RenderInkWell createNode() => new RenderInkWell();
111 } 111 }
112 112
113 class InkWell extends Component { 113 class InkWell extends Component {
114 InkWell({ Object key, this.children }) : super(key: key); 114 InkWell({ Object key, this.children }) : super(key: key);
115 115
116 final List<UINode> children; 116 final List<UINode> children;
117 117
118 UINode build() { 118 UINode build() {
119 return new InkWellWrapper( 119 return new InkWellWrapper(
120 child: new FlexContainer( 120 child: new FlexContainer(
121 direction: FlexDirection.horizontal, 121 direction: FlexDirection.horizontal,
122 justifyContent: FlexJustifyContent.center, 122 justifyContent: FlexJustifyContent.center,
123 children: children 123 children: children
124 ) 124 )
125 ); 125 );
126 } 126 }
127 } 127 }
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/components2/scaffold.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698