BertrandBev / code_field

A customizable code text field supporting syntax highlighting
https://bertrandbev.github.io/code_field/
MIT License
232 stars 61 forks source link

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

Open ruizyi opened 3 years ago

ruizyi commented 3 years ago

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 :)

BertrandBev commented 3 years ago

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

ruizyi commented 3 years ago

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

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

BertrandBev commented 3 years ago

I'll take a look at it

bennyboer commented 1 year ago

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.