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 import 'package:sky/framework/rendering/box.dart'; | 7 import 'package:sky/framework/rendering/box.dart'; |
8 import '../lib/solid_color_box.dart'; | 8 import '../lib/solid_color_box.dart'; |
9 | 9 |
10 class Rectangle extends RenderNodeWrapper { | 10 class Rectangle extends RenderNodeWrapper { |
(...skipping 20 matching lines...) Expand all Loading... |
31 new Container( | 31 new Container( |
32 decoration: new BoxDecoration(backgroundColor: const sky.C
olor(0xFFFFFF00)), | 32 decoration: new BoxDecoration(backgroundColor: const sky.C
olor(0xFFFFFF00)), |
33 desiredSize: new sky.Size(double.INFINITY, 20.0) | 33 desiredSize: new sky.Size(double.INFINITY, 20.0) |
34 ), | 34 ), |
35 new Image(src: "https://www.dartlang.org/logos/dart-logo.png", | 35 new Image(src: "https://www.dartlang.org/logos/dart-logo.png", |
36 size: new sky.Size(300.0, 300.0), | 36 size: new sky.Size(300.0, 300.0), |
37 key: 1 | 37 key: 1 |
38 ), | 38 ), |
39 ])), | 39 ])), |
40 ]), | 40 ]), |
41 onPointerDown: _handlePointerDown); | 41 onPointerDown: _handlePointerDown, |
| 42 onGestureTap: _handleGestureTap); |
42 } | 43 } |
43 | 44 |
44 void _handlePointerDown(sky.PointerEvent event) { | 45 void _handlePointerDown(sky.PointerEvent event) { |
45 print("_handlePointerDown"); | 46 print("_handlePointerDown"); |
46 } | 47 } |
| 48 |
| 49 void _handleGestureTap(sky.GestureEvent event) { |
| 50 print("_handleGestureTap"); |
| 51 } |
47 } | 52 } |
48 | 53 |
49 void main() { | 54 void main() { |
50 new ContainerApp(); | 55 new ContainerApp(); |
51 } | 56 } |
OLD | NEW |