Skip to content

Commit ea8b488

Browse files
committed
Remove moving painter.
1 parent 6556e2e commit ea8b488

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

patterns/abstract_factory/tool_panel_factory/widgets/drawing_board.dart

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)