imaNNeo / fl_chart

FL Chart is a highly customizable Flutter chart library that supports Line Chart, Bar Chart, Pie Chart, Scatter Chart, and Radar Chart.
https://flchart.dev
MIT License
6.87k stars 1.78k forks source link

Build failure with Flutter 3.22.2 #1711

Closed sdillon1 closed 4 months ago

sdillon1 commented 4 months ago

Describe the bug The build fails after a Flutter update (3.22.2 from stable channel) with the following error that suggests a Flutter API call was changed and needs to be updated in this library:

Pub/Cache/hosted/pub.dev/fl_chart-0.62.0/lib/src/utils/utils.dart:269:20: Error: Member not found: 'MediaQuery.boldTextOverride'.
    if (MediaQuery.boldTextOverride(context)) {
                   ^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

This link suggests a 1 line change to fix this build issue by changing MediaQuery.boldTextOverride to MediaQuery.boldTextOf

To Reproduce Update Flutter to 3.22.2, specify sdk: ^3.4.0 in the pubspec.yaml (as initialized with very_good cli) and attempt to build an app using a line chart

Versions

a1573595 commented 4 months ago

Describe the bug The build fails after a Flutter update (3.22.2 from stable channel) with the following error that suggests a Flutter API call was changed and needs to be updated in this library:

Pub/Cache/hosted/pub.dev/fl_chart-0.62.0/lib/src/utils/utils.dart:269:20: Error: Member not found: 'MediaQuery.boldTextOverride'.
    if (MediaQuery.boldTextOverride(context)) {
                   ^^^^^^^^^^^^^^^^
Target kernel_snapshot failed: Exception

This link suggests a 1 line change to fix this build issue by changing MediaQuery.boldTextOverride to MediaQuery.boldTextOf

To Reproduce Update Flutter to 3.22.2, specify sdk: ^3.4.0 in the pubspec.yaml (as initialized with very_good cli) and attempt to build an app using a line chart

Versions

  • Flutter 3.22.2 with sdk: ^3.4.0 in pubspec.yaml
  • FlChart ^0.62.0

fl_chart 0.68.0 is working fine, is there any reason to stop at 0.62.0?

sdillon1 commented 4 months ago

You're right, confirmed fl_chart 0.68.0 works with Flutter 3.22.2. Somehow didn't realize fl_chart 0.62.0 wasn't the latest version. Issue closed