fix: enable scrolling in CodeEditor widget

Wrap CodeField in SingleChildScrollView with minLines: 1 to prevent
overflow when YAML content exceeds available height.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeroen Schweitzer
2025-12-31 15:03:48 +01:00
co-authored by Claude Opus 4.5
parent add960d60b
commit 865b69f960
@@ -97,9 +97,11 @@ class CodeEditorState extends State<CodeEditor> {
return CodeTheme( return CodeTheme(
data: isDark ? _darkTheme(colorScheme) : _lightTheme(colorScheme), data: isDark ? _darkTheme(colorScheme) : _lightTheme(colorScheme),
child: SingleChildScrollView(
child: CodeField( child: CodeField(
controller: _controller, controller: _controller,
readOnly: widget.readOnly, readOnly: widget.readOnly,
minLines: 1,
gutterStyle: widget.showLineNumbers gutterStyle: widget.showLineNumbers
? GutterStyle( ? GutterStyle(
showLineNumbers: true, showLineNumbers: true,
@@ -123,6 +125,7 @@ class CodeEditorState extends State<CodeEditor> {
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
background: colorScheme.surfaceContainerLowest, background: colorScheme.surfaceContainerLowest,
), ),
),
); );
} }