You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExpandText behaves as expected on mobile, but the expand arrow does not appear on web. It is therefore impossible to expand the text on web.
I'm using the widget like this:
ExpandText(
"""Lorem ipsum dolor sit amet consectetur adipisicing elit. Maxime mollitia, molestiae quas vel sint commodi repudiandae consequuntur voluptatum laborum numquam blanditiis harum quisquam eius sed odit fugiat iusto fuga praesentium optio, eaque rerum! Provident similique accusantium nemo autem. Veritatis obcaecati tenetur iure eius earum ut molestias architecto voluptate aliquam nihil, eveniet aliquid culpa officia aut! Impedit sit sunt quaerat, odit, tenetur error, harum nesciunt ipsum debitis quas aliquid. Reprehenderit, quia. Quo neque error repudiandae fuga? Ipsa laudantium molestias eos sapiente officiis modi at sunt excepturi expedita sint? Sed quibusdam recusandae alias error harum maxime adipisci amet laborum. Perspiciatis minima nesciunt dolorem! Officiis iure rerum voluptates a cumque velit quibusdam sed amet tempora. Sit laborum ab, eius fugit doloribus tenetur fugiat, temporibus enim commodi iusto libero magni deleniti quod quam consequuntur! Commodi minima excepturi repudiandae velit hic maxime doloremque. Quaerat provident commodi consectetur veniam similique ad earum omnis ipsum saepe, voluptas, hic voluptates pariatur est explicabo fugiat, dolorum eligendi quam cupiditate excepturi mollitia maiores labore suscipit quas? Nulla, placeat. Voluptatem quaerat non architecto ab laudantium modi minima sunt esse temporibus sint culpa, recusandae aliquam numquam totam ratione voluptas quod exercitationem fuga. Possimus quis earum veniam quasi aliquam eligendi, placeat qui corporis!""",
style: regularTextStyle,
maxLines:5,
hintTextStyle: regularTextStyle.copyWith(color: themeOrangeColor),
collapsedHint:S.of(context).showMoreText,
expandedHint:S.of(context).showLessText,
textAlign:TextAlign.start,
)
inside the Scaffold's body.
I'm using version 2.1.0 of this package and this is my flutter doctor for version context:
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19043.1348], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[√] Connected device (2 available)
• No issues found!
The text was updated successfully, but these errors were encountered:
As you noted, it seems that there's an issue regarding the TextPainter.didExceedMaxLines method on Flutter Web using the HTML render. I'd suggest you use the canvas kit render on mobile as well. See this link.
ExpandText behaves as expected on mobile, but the expand arrow does not appear on web. It is therefore impossible to expand the text on web.
I'm using the widget like this:
inside the Scaffold's body.
I'm using version 2.1.0 of this package and this is my flutter doctor for version context:
The text was updated successfully, but these errors were encountered: