code_field icon indicating copy to clipboard operation
code_field copied to clipboard

Line numbers wrap when >999 lines

Open Apokalypser opened this issue 2 years ago • 1 comments

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

Bildschirmfoto 2022-04-07 um 21 57 03

Apokalypser avatar Apr 07 '22 19:04 Apokalypser

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

rickwyz avatar May 04 '22 13:05 rickwyz