Conversation
|
@leisim Is it possible to merge this and publish this feature? |
|
Hi @TjarcoKerssens, auto_size_text:
git:
url: https://github.com/definitelyme/auto_size_text.git
ref: ft/selectable-text |
|
Can't you just use textBuilder for this? |
|
What widget is that? There isn't a TextBuilder widget in Flutter |
|
@definitelyme Thanks for this feature, I needed it in a project of mine. These are two I found this issue that explains that there is a tiny extra margin with the In order to fix this and correctly calculate a fitting font size, we need to account for this margin in the if (widget._isSelectableText) {
textPainter.layout(maxWidth: constraints.maxWidth - widget.cursorWidth - 1.0);
} else {
textPainter.layout(maxWidth: constraints.maxWidth);
}I tested this and it seems to work. |
|
Nice! I didn't notice this, I'll update my PR. |
|
@definitelyme Any update on this? |
|
@PcolBP Is this after using the change I proposed in my comment before? If not its the same issue. |
|
@schultek Yeah, thats it. For me was enought to set just:
But, I've noticed some weird behavior. A text is blurry after shrinking. Upper text is Selectable, bottom is Text. I've created own fork with customBuilders: EDIT: Issue with blurry text related to #81215 |
I have updated my PR to include the fix you suggested. |
|
Thanks for this branch! |
|
@amejiarosario |
…auto_size_text into ft/selectable-text
|
Since Flutter 3.3 you can use the |





Tested on Android, iOS & Web platforms.