Open 131e55 opened 3 years ago
Question I had used Text.style.height and Text.textHeightBehavior for line-spacing. (not line-height) However AutoSizeText.textHeightBehavior isn't defined.
Text.style.height
Text.textHeightBehavior
AutoSizeText.textHeightBehavior
How to replace Text.textHeightBehavior? or How to express line-spacing using AutoSizeText?
Code sample Text
Text
const Text( 'Line 1\nLine2', style: TextStyle( fontSize: 18, height: 1.25, color: Colors.black, ), textAlign: TextAlign.center, textHeightBehavior: TextHeightBehavior( applyHeightToFirstAscent: false, applyHeightToLastDescent: false, ), );
AutoSizeText (can't build)
AutoSizeText
const AutoSizeText( 'Line 1\nLine2', style: TextStyle( fontSize: 18, height: 1.25, color: Colors.black, ), maxLines: 2, minFontSize: 10, textAlign: TextAlign.center, // ❌ The named parameter 'textHeightBehavior' isn't defined. textHeightBehavior: TextHeightBehavior( applyHeightToFirstAscent: false, applyHeightToLastDescent: false, ), );
Version
Question I had used
Text.style.height
andText.textHeightBehavior
for line-spacing. (not line-height) HoweverAutoSizeText.textHeightBehavior
isn't defined.How to replace Text.textHeightBehavior? or How to express line-spacing using AutoSizeText?
Code sample
Text
AutoSizeText
(can't build)Version