indratrisnar/d_chart

Failed build -> Error on Flutter Channel stable 2.5.2

Closed this issue · 8 comments

Just upgrade my flutter to the latest version, and got error like this.
color ??= Theme.of(context).textTheme.body1!.color
The problem is ini .body1

I think the error comes from charts_flutter package, because in console print output like this /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.

Sorry, if it wasn't clear enough.
here's the chronology.

  • I was using this plugin and running well
  • I decide to upgrade my flutter to the latest stable version (now 2.5.2)
  • I tried flutter build appbundle and got error like this /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/charts_flutter-0.11.0/lib/src/behaviors/legend/legend_entry_layout.dart:134:45: Error: The getter 'body1' isn't defined for the class 'TextTheme'.

I hope it helps, thanks.

yes, debug mode also stuck on the same error.