linePainter method
Implementation
Widget linePainter({
required List<Point> chartPoints,
required double gw,
required double gh,
final Color? color,
final double? strokeWidth,
final StrokeCap? strokeCap,
}) {
return Container(
color: Colors.transparent,
height: gh * 0.7 + 1,
width: gw * 0.9 + 1,
child: CustomPaint(
foregroundPainter: LineChartPainter(
points: chartPoints,
color: color,
strokeCap: strokeCap,
strokeWidth: strokeWidth,
),
),
);
}