axisYLabels method
Implementation
Widget axisYLabels(double gh, double gw, BuildContext context, List<Point> points) {
return Padding(
padding: const EdgeInsets.only(left: 0),
child: SizedBox(
height: gh,
width: gw,
child: ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
scrollDirection: Axis.vertical,
itemCount: points.length,
itemBuilder: (_, i) {
return Column(
children: [
SizedBox(
height: gh * 0.05,
child: Text(
points.reversed.toList()[i].y.toString(),
style: const TextStyle(
color: Colors.black,
fontSize: 10,
),
),
),
if (i == points.length - 1)
Container()
else
SizedBox(
height: gh * 0.7 / (points.length - 1) - gh * 0.05,
)
],
);
}),
),
);
}