code_field icon indicating copy to clipboard operation
code_field copied to clipboard

How can I switch word wrap on and off in the code_field?

Open ruizyi opened this issue 3 years ago • 4 comments

When using code files, you typically don't need longer lines to wrap around. However, with .md files this is in fact rather useful. 1 Please let me know how to disable horizontal scrolling :)

ruizyi avatar Jun 03 '21 06:06 ruizyi

I just added the option in 1.0.1-1. Let m know if that works!

BertrandBev avatar Jun 04 '21 07:06 BertrandBev

Is there way to make a gap between two line numbers when it word wrap is on?

스크린샷 2021-06-05 오후 5 16 06 copy

ruizyi avatar Jun 05 '21 08:06 ruizyi

I'll take a look at it

BertrandBev avatar Jun 28 '21 13:06 BertrandBev

I have a fix that is lacking performance. Currently we are very limited by the RenderEditable API to retrieve line metrics. Tried to get a getter merged into the Flutter framework. Fortunately they are already working on an improved API that we may use. For more details see the discussion in https://github.com/flutter/flutter/pull/119430

Once the API changes are merged into Flutter I'll update my changes https://github.com/bennyboer/code_field and create a PR.

bennyboer avatar Feb 03 '23 14:02 bennyboer