@@ -14,25 +14,22 @@ class DrawingBoard extends StatelessWidget {
1414
1515 @override
1616 Widget build (BuildContext context) {
17- return Listener (
18- onPointerMove: (e) => addShape (e.localPosition),
19- child: GestureDetector (
20- onTapDown: (e) => addShape (e.localPosition),
21- child: Container (
22- color: Color (0xff1f1f1f ),
23- child: EventListenableBuilder (
24- event: shapes.onAddShapeEvent,
25- builder: (_) {
26- return LayoutBuilder (
27- builder: (_, constraints) {
28- return CustomPaint (
29- size: Size (constraints.maxWidth, constraints.maxHeight),
30- painter: ShapesPainter (shapes),
31- );
32- },
33- );
34- },
35- ),
17+ return GestureDetector (
18+ onTapDown: (e) => addShape (e.localPosition),
19+ child: Container (
20+ color: Color (0xff1f1f1f ),
21+ child: EventListenableBuilder (
22+ event: shapes.onAddShapeEvent,
23+ builder: (_) {
24+ return LayoutBuilder (
25+ builder: (_, constraints) {
26+ return CustomPaint (
27+ size: Size (constraints.maxWidth, constraints.maxHeight),
28+ painter: ShapesPainter (shapes),
29+ );
30+ },
31+ );
32+ },
3633 ),
3734 ),
3835 );
0 commit comments