Home > Software design >  How to make AutoSizeText scale with font and two-line?
How to make AutoSizeText scale with font and two-line?

Time:03-09

I am using AutoSizeText package from enter image description here

I tried to wrap AutoSizeText with Container or SizedBox with given height but it is also not working.

How can I fix this?

CodePudding user response:

Two Way :

  Expanded(
             child:
            AutoSizeText(
                                      'Some long text that is not scaling with possible space?',
                                       style: TextStyle(
                                          fontSize: 12
                                       ),
                                       minFontSize: 6,
                                       maxLines: 2,
                                    ),
            )

OR

 AutoSizeText(
                                  'Some long text that is not scaling with possible space?',
                                   style: TextStyle(
                                      fontSize: 12
                                   ),
                                   minFontSize: 6,
                                   maxLines: 2,
        overflow: TextOverflow.ellipsis,
                                ),
  • Related