Flutter Code Editor is a multi-platform code editor supporting syntax highlighting, code blocks folding, autocompletion, read-only code blocks, hiding specific code blocks, themes, and more.
For the line numbers to be aligned with the code lines, they should share a lot of properties in TextStyle. This is because we use the natural vertical flow in the text field and in the gutter. We made two separate TextStyles for that to allow flexibility with color, weight, and other things, but the users repeatedly put different fonts, sizes, line spacing, etc. and expect the two to be aligned.
For the line numbers to be aligned with the code lines, they should share a lot of properties in
TextStyle
. This is because we use the natural vertical flow in the text field and in the gutter. We made two separateTextStyle
s for that to allow flexibility with color, weight, and other things, but the users repeatedly put different fonts, sizes, line spacing, etc. and expect the two to be aligned.See:
We should:
TextStyle
and see if different values in it break the alignment.CodeField.textStyle
and force them inGutterStyle.textStyle
.GutterStyle.textStyle
have effect and are not overridden.