Skip to content
This repository has been archived by the owner on Dec 2, 2023. It is now read-only.

Commit

Permalink
feat(example): improve appearance of detected shape
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Oct 11, 2023
1 parent c9ae952 commit c3fb24f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions example/lib/canvas_draw.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ class _CanvasDrawPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final paint = Paint()
..color = Colors.black
..strokeWidth = 2
..color = Colors.black.withOpacity(0.5)
..strokeWidth = 3
..strokeCap = StrokeCap.round;
for (var i = 0; i < state.points.length - 1; i++) {
canvas.drawLine(state.points[i], state.points[i + 1], paint);
}

final detectedShape = state.widget.detectedShape.value;
final shapePaint = Paint()
..color = Colors.red.withOpacity(0.5)
..strokeWidth = 2
..color = Colors.red.withOpacity(0.3)
..strokeWidth = 5
..strokeCap = StrokeCap.round
..style = PaintingStyle.stroke;
..style = PaintingStyle.fill;

switch (detectedShape?.shape) {
case null:
Expand Down

0 comments on commit c3fb24f

Please sign in to comment.