Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tony123S opened this issue Feb 27, 2020 · 3 comments
Closed

Comments

@tony123S
Copy link

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.
@tony123S
Copy link
Author

fixed.

@ZaidAqil
Copy link

ZaidAqil commented Dec 2, 2021

how did you fix it? Let me know please

@apgapg
Copy link
Owner

apgapg commented Dec 3, 2021

Upgrade your pie chart dependency to latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants