jesusrp98 / expand_widget

Ability to easily expand and retract a widget collection or text
https://pub.dev/packages/expand_widget
GNU General Public License v3.0
45 stars 22 forks source link

set overflow and maxlines limit to null if text is expanded, otherwis… #43

Open veronikalaskova opened 3 weeks ago

veronikalaskova commented 3 weeks ago

This PR fixes getting maxLines value depending on whether text is expanded or not.

The current _maxLines method returns the value of 66 if the text widget is expanded and has an ellipsis overflow. This has 2 issues. 1) The overflow is irrelevant when the text is expanded 2) 2 ^ 64 returns 66

The fix sets maxLines to be null if the text is expanded, otherwise use maxLines which is passed in.