Skip to content

Commit e220dec

Browse files
committed
add missing doc comments
1 parent 948953c commit e220dec

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

lib/src/dashed_line_painter.dart

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'package:flutter/rendering.dart';
66

77
/// A [CustomPainter] that can draw dashed lines.
88
class DashedLinePainter extends CustomPainter {
9+
/// Creates a new [DashedLinePainter].
910
DashedLinePainter({
1011
required this.path,
1112
required this.color,
@@ -17,16 +18,22 @@ class DashedLinePainter extends CustomPainter {
1718
required this.strokeWidth,
1819
});
1920

21+
/// Path that
2022
final Path path;
2123

2224
/// The color of the dashed line.
2325
final Color color;
2426

27+
/// How a line should be inscribed in a parent.
2528
final LineFit lineFit;
2629

27-
///
30+
/// How the whole dashed line should be aligned in the parent.
2831
final Alignment alignment;
32+
33+
/// The length of a single dahs.
2934
final double dashLength;
35+
36+
/// The space between two neighboring dashes.
3037
final double dashSpace;
3138

3239
/// The width of the edges, given in logical pixels measured in the direction
@@ -54,8 +61,8 @@ class DashedLinePainter extends CustomPainter {
5461
);
5562

5663
final pathBounds = path.getBounds();
57-
// Offset needed to move the path into the painter bounds so
58-
// that it doesn't overflow.
64+
// Offset needed to move the path into the painter bounds so that it doesn't
65+
// overflow.
5966
final negativeOffset = Offset(
6067
-pathBounds.left * scale.dx,
6168
-pathBounds.top * scale.dy,

0 commit comments

Comments
 (0)