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

AutoSizeText is resizing, but cut the resulting string #64

Open
0xbadb0d00 opened this issue Jul 23, 2020 · 6 comments
Open

AutoSizeText is resizing, but cut the resulting string #64

0xbadb0d00 opened this issue Jul 23, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@0xbadb0d00
Copy link

Version

  • Flutter version: 1.12.13+hotfix.5
  • auto_size_text version: 2.1.0

Hello,
I'am trying to use your wonderful plugin, but it, even if plugin did a resizing, doesn't work correctly.

I am trying following test code to show that string in just 2 lines:

`

                        new SizedBox(
                          height: 30.0,
                          child: new AutoSizeText(
                            "qA6HMMbvyCKZM8rmy66iVKZyy6B5ogeJijipTJMUkvi62an95HVh6WGoBwSV8ZSZNWGD3lFVVx4MX3ZHIP8vu71kEwhHD0k5JUlFYeBP4kY9rcDfKyQAlbeP8ck0o4hi7wcq4tsXTFGEcAJmfsSkA6XNdzLwOPmwDjwA7gbdhXN7knItyxaY1r3ze68OPsAXV6jIvx63M339XQigzshq8TVLsy3XiPa2Fju5bcnidgrlRdCztcFJXANoyF2G2VT4qhc1aI2qHi5JR3kadh8XYleSClis06lPdt896hyTsFRP",
                            maxLines: 2,
                          ),
                        ),

`

This is what I see with a normal Text Widget:
qemu-system-x86_64_5vRQDm4MyB

This is instead what I see with AutoSizeText Widget:
qemu-system-x86_64_Ewac31h6Qi

The text size switched from 14 to 12 with AutoSizeText Widget, but the resulting text is cutted.

Can you please check it? Do you have any suggestion?

@0xbadb0d00 0xbadb0d00 added the bug Something isn't working label Jul 23, 2020
@1207roy
Copy link

1207roy commented Jul 26, 2020

I have also faced the same issue. Am I missing something here?

SizedBox(
        width: 324.0
        height: 30.0,
        child: AutoSizeText(
          'some long text string',
          style: TextStyle(color: Colors.red),
          maxLines: 1,
          group: someTextGroup,
        ),
      )

@matthewlloyd
Copy link

Check the minFontSize setting, the default is 12 points. In the screenshots, the font size appears to be larger with the AutoSizeText than with the normal Text widget. What is the font size with the normal Text widget?

@easazade
Copy link

i am having this problem as well it is just cutting the string

@easazade
Copy link

easazade commented Nov 26, 2020

Just use FittedBox instead of AutoSizeText

FittedBox(
    child: Text('my long text ...'),
)

@rohan20
Copy link

rohan20 commented Jul 16, 2021

Set minFontSize to 8 or 10. Still feels legible with this font size.

@flawnn
Copy link

flawnn commented Jun 18, 2023

Just use FittedBox instead of AutoSizeText

FittedBox(
    child: Text('my long text ...'),
)

image
Just wrapping the (Autosize)Text Widget into a FittedBox does it. No need to resort only to Text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants