linePainter method

Widget linePainter({
  1. required List<Point> chartPoints,
  2. required double gw,
  3. required double gh,
  4. Color? color,
  5. double? strokeWidth,
  6. StrokeCap? strokeCap,
})

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,
      ),
    ),
  );
}