Santos-Enoque / flutter-web-dashboard-template

270 stars 202 forks source link

/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; #16

Open goodmanworld opened 2 years ago

goodmanworld commented 2 years ago

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 2 years ago

pubspec.yaml, upgrade from charts_flutter: ^0.10.0 to charts_flutter: ^0.12.0

fisforfaheem commented 2 years ago

still having same issues please tell how to fix

dieg00uy commented 2 years ago

still having same issues please tell how to fix

Hi @fisforfaheem ; try with the workaround mentioned by @IanShaksana , this work for me!

Mahdame commented 1 year ago

Upgrade from _chartsflutter 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;)