Open sma opened 1 year ago
I noticed this issue (https://github.com/BertrandBev/code_field/issues/6), which has been open since 2021, which means that text wrapping support has been missing for two years now, and because someone wants to restructure something somewhere in the Flutter framework (https://github.com/flutter/flutter/pull/119430), I don't think we'll get a way to access line metrics and get a solution in the next few months.
A potential workaround for the Flutter issue is to:
y
the same way we calculate the suggestion box offset.y
s.It feels slow but should work for someone who really needs this.
This is not a top priority to us but if you make a PR we would be happy to review it.
Please support your
CodeField.wrap
property which currently seems to do nothing. This is the only feature I really need from an editor so it is rather unfortunate that after I struggles through all other issues I reported before, this should be the reason why I can't use it after all. It would also important for me that the wrap keeps the indentation. I think, the normal FlutterTextField
does not.The challenge with word wrapping is probably keeping the gutter in sync which then needs to have different heights per line and the naive approach to layout each line twice might be too slow, I don't know. As you use a
TextField
as a core, you probably cannot access the internal layout of its text rendering.