Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use textScaler instead of textScale to get rid of deprecation warning #1495

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

imaNNeo
Copy link
Owner

@imaNNeo imaNNeo commented Nov 21, 2023

No description provided.

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (b3529d3) 86.67% compared to head (888803f) 86.58%.
Report is 9 commits behind head on master.

Files Patch % Lines
lib/src/extensions/bar_chart_data_extension.dart 81.25% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1495      +/-   ##
==========================================
- Coverage   86.67%   86.58%   -0.10%     
==========================================
  Files          45       45              
  Lines        3016     3018       +2     
==========================================
- Hits         2614     2613       -1     
- Misses        402      405       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@imaNNeo imaNNeo merged commit 4a2924a into master Nov 21, 2023
5 of 6 checks passed
@imaNNeo imaNNeo deleted the improvement/text-scale-factor-deprecated branch November 21, 2023 01:42
@cantomris
Copy link

cantomris commented Nov 25, 2023

Hi!

I am getting an error maybe related to this. The feature I wanted to use was LineCharSample2 from your pub page.

`../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:42:5: Error: Type 'TextScaler' not found.
TextScaler textScaler,
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:67:3: Error: Type 'TextScaler' not found.
TextScaler get textScaler => _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:68:3: Error: Type 'TextScaler' not found.
TextScaler _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:70:18: Error: Type 'TextScaler' not found.
set textScaler(TextScaler value) {
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/base/base_chart/base_chart_painter.dart:31:9: Error: Type 'TextScaler' not found.
final TextScaler textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:47:5: Error: Type 'TextScaler' not found.
TextScaler textScaler,
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:73:3: Error: Type 'TextScaler' not found.
TextScaler get textScaler => _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:74:3: Error: Type 'TextScaler' not found.
TextScaler _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:75:18: Error: Type 'TextScaler' not found.
set textScaler(TextScaler value) {
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:53:5: Error: Type 'TextScaler' not found.
TextScaler textScaler,
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:80:3: Error: Type 'TextScaler' not found.
TextScaler get textScaler => _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:81:3: Error: Type 'TextScaler' not found.
TextScaler _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:83:18: Error: Type 'TextScaler' not found.
set textScaler(TextScaler value) {
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:46:5: Error: Type 'TextScaler' not found.
TextScaler textScaler,
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:71:3: Error: Type 'TextScaler' not found.
TextScaler get textScaler => _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:72:3: Error: Type 'TextScaler' not found.
TextScaler _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:74:18: Error: Type 'TextScaler' not found.
set textScaler(TextScaler value) {
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:50:5: Error: Type 'TextScaler' not found.
TextScaler textScaler,
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:75:3: Error: Type 'TextScaler' not found.
TextScaler get textScaler => _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:76:3: Error: Type 'TextScaler' not found.
TextScaler _textScaler;
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:78:18: Error: Type 'TextScaler' not found.
set textScaler(TextScaler value) {
^^^^^^^^^^
../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:22:32: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.

  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../FlutterDev/flutter/packages/flutter/lib/src/widgets/media_query.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'textScaler'.
    MediaQuery.of(context).textScaler,
    ^^^^^^^^^^
    `

Please let me know if you need more information about this. Thanks.

@imaNNeo
Copy link
Owner Author

imaNNeo commented Nov 25, 2023

What's your flutter version? Are you using the latest version?

@dananee
Copy link

dananee commented Nov 25, 2023

Hey, I have the same issue any update on how to fix it?

@dananee
Copy link

dananee commented Nov 25, 2023

What's your flutter version? Are you using the latest version?

I work on old project with flutter version 3.13.9

@cantomris
Copy link

Mine is an old version as well 3.10.6.

@imaNNeo
Copy link
Owner Author

imaNNeo commented Dec 1, 2023

Okay so don't upgrade the fl_chart version before you upgrade the Flutter version.
because the new fl_chart version is only compatible with the new Flutter version because of this breaking change introduced by Flutter

@cantomris
Copy link

Oh I see. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants