/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.10.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'. - 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/Android/flutter/packages/flutter/lib/src/material/text_theme.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'. color ??= Theme.of(context).textTheme.body1.color;
goodmanworld opened this issue · 4 comments
goodmanworld commented
I just downloaded and tried to run the project but when I try to launch it I get the following error message:
/C:/Android/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.10.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter
'body1' isn't defined for the class 'TextTheme'.
- 'TextTheme' is from 'package:flutter/src/material/text_theme.dart' ('/C:/Android/flutter/packages/flutter/lib/src/material/text_theme.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'body1'.
color ??= Theme.of(context).textTheme.body1.color;
It seems there is no other error messages in the project and it only can't be launched.
IanShaksana commented
pubspec.yaml, upgrade from charts_flutter: ^0.10.0 to charts_flutter: ^0.12.0
fisforfaheem commented
still having same issues please tell how to fix
dieg00uy commented
still having same issues please tell how to fix
Hi @fisforfaheem ; try with the workaround mentioned by @IanShaksana , this work for me!
Mahdame commented
Upgrade from charts_flutter to charts_flutter_new: ^0.12.0 and change any reference of charts_flutter to charts_flutter_new (e.g. import 'package:charts_flutter_new/flutter.dart' as charts;)