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

Line numbers wrap when >999 lines #32

Closed Apokalypser closed 1 year ago

Apokalypser commented 2 years ago

Experienced in live demo when editing a file with more than 999 lines.

Bildschirmfoto 2022-04-07 um 21 57 03
rickwyz commented 2 years ago

LineNumberStyle lineNumberStyle = LineNumberStyle(width: 75, textAlign: TextAlign.center);

return Scaffold( appBar: AppBar(title: Text(config.key)), body: SingleChildScrollView( child: CodeField( controller: _codeController!, textStyle: TextStyle(fontFamily: 'SourceCode'), lineNumberStyle: lineNumberStyle, ), ),

Just increase the LineNumberStyle.width