apgapg/pie_chart

Error: The method 'getColor' isn't defined for the class 'PieChartPainter'.

tony123S opened this issue · 3 comments

I get this error

../../flutter_linux_v1.5.4-hotfix.2-stable.tar%20(1)/flutter/.pub-cache/hosted/pub.dartlang.org/pie_chart-3.1.1/lib/src/chart_painter.dart:41:38: Error: The method 'getColor' isn't defined for the class 'PieChartPainter'.
 - 'PieChartPainter' is from 'package:pie_chart/src/chart_painter.dart' ('../../flutter_linux_v1.5.4-hotfix.2-stable.tar%20(1)/flutter/.pub-cache/hosted/pub.dartlang.org/pie_chart-3.1.1/lib/src/chart_painter.dart').
Try correcting the name to the name of an existing method, or defining a method named 'getColor'.
      final paint = Paint()..color = getColor(colorList, i);
                                     ^^^^^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

fixed.

how did you fix it? Let me know please

Upgrade your pie chart dependency to latest