You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the documentation and this error occurred with me
To Reproduce
Run this command: flutter pub add fl_char
And add this in any page "import 'package:fl_chart/fl_chart.dart';", the error is show in debug terminal
Versions
Flutter: ^3.5.3
fl_chart: ^0.70.2
Error in debug console:
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_data.dart:1470:43: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (strokeWidth != 0.0 && strokeColor.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_data.dart:1567:43: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (strokeWidth != 0.0 && strokeColor.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_data.dart:550:35: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
'MaterialColor' is from 'package:flutter/src/material/colors.dart' ('../../../../flutter/packages/flutter/lib/src/material/colors.dart').
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
? Colors.blueGrey.withValues(alpha: 0.5)
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_data.dart:606:35: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
'MaterialColor' is from 'package:flutter/src/material/colors.dart' ('../../../../flutter/packages/flutter/lib/src/material/colors.dart').
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
? Colors.blueGrey.withValues(alpha: 0.5)
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/radar_chart/radar_chart_data.dart:300:46: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
'MaterialColor' is from 'package:flutter/src/material/colors.dart' ('../../../../flutter/packages/flutter/lib/src/material/colors.dart').
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
fillColor = fillColor ?? Colors.cyan.withValues(alpha: 0.2),
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:9:20: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
_floatToInt8(a),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:10:21: Error: The getter 'r' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'r'.
(_floatToInt8(r) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:11:21: Error: The getter 'g' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'g'.
(_floatToInt8(g) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:12:21: Error: The getter 'b' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'.
(_floatToInt8(b) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_painter.dart:159:30: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (data.backgroundColor.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:12:20: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (left.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:13:19: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
top.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:14:21: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
right.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:15:22: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
bottom.color.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/bar_chart/bar_chart_painter.dart:339:56: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (borderSide.width > 0 && borderSide.color.a > 0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/bar_chart/bar_chart_painter.dart:637:71: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (stackItem.borderSide.width == 0 || stackItem.borderSide.color.a == 0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_painter.dart:1001:47: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (!barData.show || barData.shadow.color.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/paint_extension.dart:8:21: Error: The method 'withValues' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
color = color.withValues(alpha: 0);
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/pie_chart/pie_chart_painter.dart:146:38: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
section.borderSide.color.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/pie_chart/pie_chart_painter.dart:332:69: Error: The getter 'a' isn't defined for the class 'Color'.
'Color' is from 'dart:ui'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (section.borderSide.width != 0.0 && section.borderSide.color.a != 0.0) {
^
Target kernel_snapshot_program failed: Exception
The text was updated successfully, but these errors were encountered:
I followed the documentation and this error occurred with me
To Reproduce
Run this command:
flutter pub add fl_char
And add this in any page "import 'package:fl_chart/fl_chart.dart';", the error is show in debug terminal
Versions
Error in debug console:
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_data.dart:1470:43: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (strokeWidth != 0.0 && strokeColor.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_data.dart:1567:43: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (strokeWidth != 0.0 && strokeColor.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_data.dart:550:35: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
? Colors.blueGrey.withValues(alpha: 0.5)
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_data.dart:606:35: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
? Colors.blueGrey.withValues(alpha: 0.5)
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/radar_chart/radar_chart_data.dart:300:46: Error: The method 'withValues' isn't defined for the class 'MaterialColor'.
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
fillColor = fillColor ?? Colors.cyan.withValues(alpha: 0.2),
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:9:20: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
_floatToInt8(a),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:10:21: Error: The getter 'r' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'r'.
(_floatToInt8(r) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:11:21: Error: The getter 'g' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'g'.
(_floatToInt8(g) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/color_extension.dart:12:21: Error: The getter 'b' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'b'.
(_floatToInt8(b) * value).round(),
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/base/axis_chart/axis_chart_painter.dart:159:30: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (data.backgroundColor.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:12:20: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (left.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:13:19: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
top.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:14:21: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
right.color.a == 0.0 &&
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/border_extension.dart:15:22: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
bottom.color.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/bar_chart/bar_chart_painter.dart:339:56: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (borderSide.width > 0 && borderSide.color.a > 0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/bar_chart/bar_chart_painter.dart:637:71: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (stackItem.borderSide.width == 0 || stackItem.borderSide.color.a == 0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/line_chart/line_chart_painter.dart:1001:47: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (!barData.show || barData.shadow.color.a == 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/extensions/paint_extension.dart:8:21: Error: The method 'withValues' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing method, or defining a method named 'withValues'.
color = color.withValues(alpha: 0);
^^^^^^^^^^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/pie_chart/pie_chart_painter.dart:146:38: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
section.borderSide.color.a != 0.0) {
^
../../../../AppData/Local/Pub/Cache/hosted/pub.dev/fl_chart-0.70.2/lib/src/chart/pie_chart/pie_chart_painter.dart:332:69: Error: The getter 'a' isn't defined for the class 'Color'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'a'.
if (section.borderSide.width != 0.0 && section.borderSide.color.a != 0.0) {
^
Target kernel_snapshot_program failed: Exception
The text was updated successfully, but these errors were encountered: