@@ -9,9 +9,45 @@ class ScanWindowOverlay extends StatelessWidget {
9
9
super .key,
10
10
required this .controller,
11
11
required this .scanWindow,
12
+ this .borderColor = Colors .white,
13
+ this .borderRadius = BorderRadius .zero,
14
+ this .borderStrokeCap = StrokeCap .butt,
15
+ this .borderStrokeJoin = StrokeJoin .miter,
16
+ this .borderStyle = PaintingStyle .stroke,
17
+ this .borderWidth = 2.0 ,
12
18
this .color = const Color (0x80000000 ),
13
19
});
14
20
21
+ /// The color for the scan window border.
22
+ ///
23
+ /// Defaults to [Colors.white] .
24
+ final Color borderColor;
25
+
26
+ /// The border radius for the scan window and its border.
27
+ ///
28
+ /// Defaults to [BorderRadius.zero] .
29
+ final BorderRadius borderRadius;
30
+
31
+ /// The stroke cap for the border around the scan window.
32
+ ///
33
+ /// Defaults to [StrokeCap.butt] .
34
+ final StrokeCap borderStrokeCap;
35
+
36
+ /// The stroke join for the border around the scan window.
37
+ ///
38
+ /// Defaults to [StrokeJoin.miter] .
39
+ final StrokeJoin borderStrokeJoin;
40
+
41
+ /// The style for the border around the scan window.
42
+ ///
43
+ /// Defaults to [PaintingStyle.stroke] .
44
+ final PaintingStyle borderStyle;
45
+
46
+ /// The width for the border around the scan window.
47
+ ///
48
+ /// Defaults to 2.0.
49
+ final double borderWidth;
50
+
15
51
/// The color for the scan window box.
16
52
///
17
53
/// Defaults to [Colors.black] with 50% opacity.
@@ -40,6 +76,12 @@ class ScanWindowOverlay extends StatelessWidget {
40
76
return CustomPaint (
41
77
size: value.size,
42
78
painter: ScanWindowPainter (
79
+ borderColor: borderColor,
80
+ borderRadius: borderRadius,
81
+ borderStrokeCap: borderStrokeCap,
82
+ borderStrokeJoin: borderStrokeJoin,
83
+ borderStyle: borderStyle,
84
+ borderWidth: borderWidth,
43
85
scanWindow: scanWindow,
44
86
color: color,
45
87
),
0 commit comments