Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line numbers #270

Closed
muhsintr opened this issue May 4, 2024 · 2 comments
Closed

Line numbers #270

muhsintr opened this issue May 4, 2024 · 2 comments

Comments

@muhsintr
Copy link

muhsintr commented May 4, 2024

Line numbers are not aligned with code lines.
Screenshot 2024-05-04 at 10 09 08

As attached, line numbers in the left side (80-83) are above expected position.

@franklin83diaz
Copy link

in my case the solution was added height: 1.5 to the gutterStyle

 ...
 child: ListView(
          children: [
            CodeField(
              controller: controller,
              minLines: 20,
              gutterStyle: const GutterStyle(
                textStyle: TextStyle(color: Colors.grey, height: 1.5),
                showLineNumbers: true,
              ),
              onChanged: (text) {
                print(text);
              },
            ),
          ],
        ),
...

@muhsintr
Copy link
Author

in my case the solution was added height: 1.5 to the gutterStyle

 ...
 child: ListView(
          children: [
            CodeField(
              controller: controller,
              minLines: 20,
              gutterStyle: const GutterStyle(
                textStyle: TextStyle(color: Colors.grey, height: 1.5),
                showLineNumbers: true,
              ),
              onChanged: (text) {
                print(text);
              },
            ),
          ],
        ),
...

It worked. Thanks a lot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants