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 'dart:sky' as sky; | 5 import 'dart:sky' as sky; |
6 import 'package:sky/framework/fn2.dart'; | 6 import 'package:sky/framework/fn2.dart'; |
7 | 7 |
8 class ContainerApp extends App { | 8 class ContainerApp extends App { |
9 UINode build() { | 9 UINode build() { |
10 return new EventListenerNode( | 10 return new EventListenerNode( |
11 new Rectangle(0xFF00FFFF), | 11 new BlockContainer(children: [ |
| 12 new Rectangle(0xFF00FFFF, key: 1), |
| 13 new Rectangle(0xFF00FF00, key: 2), |
| 14 new Rectangle(0xFF0000FF, key: 3) |
| 15 ]), |
12 onPointerDown: _handlePointerDown); | 16 onPointerDown: _handlePointerDown); |
13 } | 17 } |
14 | 18 |
15 void _handlePointerDown(sky.PointerEvent event) { | 19 void _handlePointerDown(sky.PointerEvent event) { |
16 print("_handlePointerDown"); | 20 print("_handlePointerDown"); |
17 } | 21 } |
18 } | 22 } |
19 | 23 |
20 void main() { | 24 void main() { |
21 new ContainerApp(); | 25 new ContainerApp(); |
22 } | 26 } |
OLD | NEW |