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

TextScaler' not found #1514

Closed
mauricev opened this issue Nov 30, 2023 · 4 comments
Closed

TextScaler' not found #1514

mauricev opened this issue Nov 30, 2023 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@mauricev
Copy link

When building on iOS with 0.65.0, I get

Error (Xcode): ../../../../.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.

0.64.0 doesn’t have this error.

@anilkumar416
Copy link

facing the same issue

../../.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/scatter_chart/scatter_chart_renderer.dart:27:32: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.

  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:38:45: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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'.
    ..textScaler = MediaQuery.of(context).textScaler
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:50:5: Error: 'TextScaler' isn't a type.
    TextScaler textScaler,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:76:3: Error: 'TextScaler' isn't a type.
    TextScaler _textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_renderer.dart:78:18: Error: 'TextScaler' isn't a type.
    set textScaler(TextScaler value) {
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_painter.dart:141:11: Error: No named parameter with the name 'textScaler'.
    textScaler: holder.textScaler,
    ^^^^^^^^^^
    ../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart:489:3: Context: Found this candidate, but the arguments don't match.
    TextPainter({
    ^^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/scatter_chart/scatter_chart_painter.dart:236:7: Error: No named parameter with the name 'textScaler'.
    textScaler: holder.textScaler,
    ^^^^^^^^^^
    ../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart:489:3: Context: Found this candidate, but the arguments don't match.
    TextPainter({
    ^^^^^^^^^^^
    ../../.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/base/base_chart/base_chart_painter.dart:31:9: Error: 'TextScaler' isn't a type.
    final TextScaler textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_painter.dart:1018:9: Error: No named parameter with the name 'textScaler'.
    textScaler: holder.textScaler,
    ^^^^^^^^^^
    ../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart:489:3: Context: Found this candidate, but the arguments don't match.
    TextPainter({
    ^^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_painter.dart:370:7: Error: No named parameter with the name 'textScaler'.
    textScaler: holder.textScaler,
    ^^^^^^^^^^
    ../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart:489:3: Context: Found this candidate, but the arguments don't match.
    TextPainter({
    ^^^^^^^^^^^
    ../../.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/radar_chart/radar_chart_renderer.dart:26:32: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:34:45: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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'.
    ..textScaler = MediaQuery.of(context).textScaler
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:46:5: Error: 'TextScaler' isn't a type.
    TextScaler textScaler,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:72:3: Error: 'TextScaler' isn't a type.
    TextScaler _textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_renderer.dart:74:18: Error: 'TextScaler' isn't a type.
    set textScaler(TextScaler value) {
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/radar_chart/radar_chart_painter.dart:279:9: Error: The setter 'textScaler' isn't defined for the class 'TextPainter'.
  • 'TextPainter' is from 'package:flutter/src/painting/text_painter.dart' ('../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart').
    Try correcting the name to the name of an existing setter, or defining a setter or field named 'textScaler'.
    ..textScaler = holder.textScaler;
    ^^^^^^^^^^
    ../../.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/pie_chart/pie_chart_renderer.dart:29:32: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:37:45: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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'.
    ..textScaler = MediaQuery.of(context).textScaler
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:53:5: Error: 'TextScaler' isn't a type.
    TextScaler textScaler,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:81:3: Error: 'TextScaler' isn't a type.
    TextScaler _textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_renderer.dart:83:18: Error: 'TextScaler' isn't a type.
    set textScaler(TextScaler value) {
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/pie_chart/pie_chart_painter.dart:357:11: Error: No named parameter with the name 'textScaler'.
    textScaler: holder.textScaler,
    ^^^^^^^^^^
    ../../Documents/flutter/packages/flutter/lib/src/painting/text_painter.dart:489:3: Context: Found this candidate, but the arguments don't match.
    TextPainter({
    ^^^^^^^^^^^
    ../../.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/line_chart/line_chart_renderer.dart:27:32: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:35:45: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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'.
    ..textScaler = MediaQuery.of(context).textScaler
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:47:5: Error: 'TextScaler' isn't a type.
    TextScaler textScaler,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:74:3: Error: 'TextScaler' isn't a type.
    TextScaler _textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/line_chart/line_chart_renderer.dart:75:18: Error: 'TextScaler' isn't a type.
    set textScaler(TextScaler value) {
    ^^^^^^^^^^
    ../../.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/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' ('../../Documents/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,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:30:45: Error: The getter 'textScaler' isn't defined for the class 'MediaQueryData'.
  • 'MediaQueryData' is from 'package:flutter/src/widgets/media_query.dart' ('../../Documents/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'.
    ..textScaler = MediaQuery.of(context).textScaler
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:42:5: Error: 'TextScaler' isn't a type.
    TextScaler textScaler,
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:68:3: Error: 'TextScaler' isn't a type.
    TextScaler _textScaler;
    ^^^^^^^^^^
    ../../.pub-cache/hosted/pub.dev/fl_chart-0.65.0/lib/src/chart/bar_chart/bar_chart_renderer.dart:70:18: Error: 'TextScaler' isn't a type.
    set textScaler(TextScaler value) {
    ^^^^^^^^^^

@anilkumar416
Copy link

the above issue is not happening in 0.64.0 version

@charlescyt
Copy link

Duplicate of #1509

TextScaler was introduced in Flutter 3.16.0.
Either upgrade you Flutter SDK to 3.16.0 up or use the previous 0.64.0 version.

@imaNNeo imaNNeo added the duplicate This issue or pull request already exists label Dec 1, 2023
@imaNNeo imaNNeo closed this as completed Dec 1, 2023
@danbil24
Copy link

../../.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.
I am facing the same issue with version 0.65.0, but it works fine in version 0.64.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

5 participants