flutter-code-editor icon indicating copy to clipboard operation
flutter-code-editor copied to clipboard

Material 3 causes progressing misalignment in code and line numbers

Open alexeyinkin opened this issue 2 years ago • 1 comments

Note: This issue is about misalignment that progresses with each line. For equally misaligned lines with Material 2, see #261

Steps to reproduce:

  1. Take the 02.code_field example as of 0f18b2b1dab6cf7db3aeeb152fc02d287e662ea7
  2. 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: image

iOS: image

alexeyinkin avatar Nov 08 '23 08:11 alexeyinkin

you can solve it by using parameter:

 gutterStyle: const GutterStyle(textStyle: TextStyle(height: 1.5)),

T2XX avatar May 02 '24 09:05 T2XX