flutter-code-editor
flutter-code-editor copied to clipboard
Material 3 causes progressing misalignment in code and line numbers
Note: This issue is about misalignment that progresses with each line. For equally misaligned lines with Material 2, see #261
Steps to reproduce:
- Take the 02.code_field example as of 0f18b2b1dab6cf7db3aeeb152fc02d287e662ea7
- Add the following property to
MaterialApp:
theme: ThemeData(
useMaterial3: true,
),
- Without that, numbers are either aligned or equally misaligned, as described in https://github.com/akvelon/flutter-code-editor/issues/261
- With that:
Web:
iOS:
you can solve it by using parameter:
gutterStyle: const GutterStyle(textStyle: TextStyle(height: 1.5)),