OLD | NEW |
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 canvas.restore(); | 97 canvas.restore(); |
98 } | 98 } |
99 super.paint(canvas); | 99 super.paint(canvas); |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 class InkWellWrapper extends OneChildRenderObjectWrapper { | 103 class InkWellWrapper extends OneChildRenderObjectWrapper { |
104 InkWellWrapper({ UINode child, Object key }) | 104 InkWellWrapper({ UINode child, Object key }) |
105 : super(child: child, key: key); | 105 : super(child: child, key: key); |
106 | 106 |
107 RenderInkWell get root => super.root as RenderInkWell; | 107 RenderInkWell get root { RenderInkWell result = super.root; return result; } |
108 | 108 |
109 RenderInkWell createNode() => new RenderInkWell(); | 109 RenderInkWell createNode() => new RenderInkWell(); |
110 } | 110 } |
111 | 111 |
112 class InkWell extends Component { | 112 class InkWell extends Component { |
113 InkWell({ Object key, this.children }) : super(key: key); | 113 InkWell({ Object key, this.children }) : super(key: key); |
114 | 114 |
115 final List<UINode> children; | 115 final List<UINode> children; |
116 | 116 |
117 UINode build() { | 117 UINode build() { |
118 return new InkWellWrapper( | 118 return new InkWellWrapper( |
119 child: new FlexContainer( | 119 child: new FlexContainer( |
120 direction: FlexDirection.horizontal, | 120 direction: FlexDirection.horizontal, |
121 justifyContent: FlexJustifyContent.center, | 121 justifyContent: FlexJustifyContent.center, |
122 children: children | 122 children: children |
123 ) | 123 ) |
124 ); | 124 ); |
125 } | 125 } |
126 } | 126 } |
OLD | NEW |