Skip to content

AutoSizeText not working last word does not appearΒ #141

@mu7mmd

Description

@mu7mmd

Steps to Reproduce
I show simple item price with price label and currency symbol, I use AutoSizeText.rich to manage styles, and if the text is larger than space it does not count the last word, the currency symbol does not appear, and if I write a word after the currency symbol the text shrink to fit the text with currency symbol but again the last word does not count and does not appear!.
Even when I tried to use Row with separated AutoSizeText still the same.

Code sample

AutoSizeText.rich(
                        TextSpan(
                          text: '${locale.priceWithVat} : ',
                          style: TextStyles.smallRegular,
                          children: [
                            TextSpan(
                              text: '${item.priceWithVat} ${locale.sar}',
                              style: TextStyles.smallBold,
                            ),
                          ],
                        ),
                        maxLines: 1,
                        minFontSize: 10,
                      )

Screenshots

  1. when text: '${item.priceWithVat} ${locale.sar}'
Screenshot 2024-02-21 at 12 35 13 PM Screenshot 2024-02-21 at 12 35 27 PM
  1. when text: '${item.priceWithVat} ${locale.sar} ss'
Screenshot 2024-02-21 at 12 36 54 PM Screenshot 2024-02-21 at 12 34 15 PM

Version

  • Flutter version: [3.16.0]
  • auto_size_text version: [3.0.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions