auto_size_text
auto_size_text copied to clipboard
Add textBuilder(double fontSize, TextStyle style, int maxLines)
It would be nice to use this widget's ability to calculate the optimal font size, but replace it with our own Widgets that use that info.
For example, I might want to replace the default Text(), with a TextFormField(). Having a builder would be a simple, flexible approach serving any future use cases.
This should be as simple as adding:
if(widget.textBuilder != null) return widget.textBuilder(fontSize, style, maxLines);
@ line 414- auto_size_text.dart