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

The getter 'text' isn't defined for the class 'InlineSpan'. #23

Open
LogicRepo opened this issue Jul 14, 2021 · 2 comments
Open

The getter 'text' isn't defined for the class 'InlineSpan'. #23

LogicRepo opened this issue Jul 14, 2021 · 2 comments

Comments

@LogicRepo
Copy link

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_candlesticks-0.1.4/lib/flutter_candlesticks.dart:190:57: Error: The getter 'text' isn't defined for the class 'InlineSpan'.

  • 'InlineSpan' is from 'package:flutter/src/painting/inline_span.dart' ('/C:/src/flutter/packages/flutter/lib/src/painting/inline_span.dart').
    Try correcting the name to the name of an existing getter, or defining a getter or field named 'text'.
    width = size.width - gridLineTextPainters[0].text.text.length * 6;

I'm getting this error. if anyone knows it , please help here.

@Gdailyer
Copy link

Gdailyer commented Sep 6, 2021

InlineSpan inlineSpan = gridLineTextPainters[0].text;
width = size.width - inlineSpan.toPlainText().length * 6;

@someshjadhwani24
Copy link

InlineSpan inlineSpan = gridLineTextPainters[0].text;
width = size.width - inlineSpan.toPlainText().length * 6;

Hey , where do I add this piece of code to fix the issue?

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

No branches or pull requests

3 participants