Commit ccfecf43 authored by Hans Muller's avatar Hans Muller

Restored overlay_geometry example

parent f77319fc
...@@ -31,9 +31,8 @@ class Marker extends StatelessComponent { ...@@ -31,9 +31,8 @@ class Marker extends StatelessComponent {
final double size; final double size;
final MarkerType type; final MarkerType type;
void paintMarker(ui.Canvas canvas, _) { void paintMarker(PaintingCanvas canvas, _) {
Paint paint = new Paint()..color = const Color(0x8000FF00); Paint paint = new Paint()..color = const Color(0x8000FF00);
paint.setStyle(ui.PaintingStyle.fill);
double r = size / 2.0; double r = size / 2.0;
canvas.drawCircle(new Point(r, r), r, paint); canvas.drawCircle(new Point(r, r), r, paint);
...@@ -103,7 +102,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> { ...@@ -103,7 +102,7 @@ class OverlayGeometryAppState extends State<OverlayGeometryApp> {
}); });
} }
void handlePointerDown(GlobalKey target, ui.PointerEvent event) { void handlePointerDown(GlobalKey target, PointerInputEvent event) {
setState(() { setState(() {
markers[MarkerType.touch] = new Point(event.x, event.y); markers[MarkerType.touch] = new Point(event.x, event.y);
final RenderBox box = target.currentContext.findRenderObject(); final RenderBox box = target.currentContext.findRenderObject();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment