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

Unified Diff: sky/examples/lib/solid_color_box.dart

Issue 1178783002: Spinning Square example for the RenderObject API. (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 | « no previous file | sky/examples/rendering/spinning_flex.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/lib/solid_color_box.dart
diff --git a/sky/examples/lib/solid_color_box.dart b/sky/examples/lib/solid_color_box.dart
index bd5426a6eeba9348ac7094ca62ef1a31b1c27cae..6c598e76926c9219da5c68176305de8e01d7d2e7 100644
--- a/sky/examples/lib/solid_color_box.dart
+++ b/sky/examples/lib/solid_color_box.dart
@@ -2,7 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-import 'dart:sky';
+import 'dart:sky' as sky;
+import 'package:sky/framework/rendering/object.dart';
import 'package:sky/framework/rendering/box.dart';
class RenderSolidColorBox extends RenderDecoratedBox {
@@ -41,10 +42,10 @@ class RenderSolidColorBox extends RenderDecoratedBox {
size = constraints.constrain(desiredSize);
}
- void handlePointer(PointerEvent event) {
+ void handleEvent(sky.Event event, BoxHitTestEntry entry) {
if (event.type == 'pointerdown')
decoration = new BoxDecoration(backgroundColor: const Color(0xFFFF0000));
else if (event.type == 'pointerup')
decoration = new BoxDecoration(backgroundColor: backgroundColor);
}
-}
+}
« no previous file with comments | « no previous file | sky/examples/rendering/spinning_flex.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698