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,31 +97,34 @@ class CodeEditorState extends State<CodeEditor> {
return CodeTheme( return CodeTheme(
data: isDark ? _darkTheme(colorScheme) : _lightTheme(colorScheme), data: isDark ? _darkTheme(colorScheme) : _lightTheme(colorScheme),
child: CodeField( child: SingleChildScrollView(
controller: _controller, child: CodeField(
readOnly: widget.readOnly, controller: _controller,
gutterStyle: widget.showLineNumbers readOnly: widget.readOnly,
? GutterStyle( minLines: 1,
showLineNumbers: true, gutterStyle: widget.showLineNumbers
showErrors: false, ? GutterStyle(
showFoldingHandles: false, showLineNumbers: true,
margin: 0, showErrors: false,
textStyle: TextStyle( showFoldingHandles: false,
fontFamily: 'monospace', margin: 0,
fontSize: 12, textStyle: TextStyle(
color: colorScheme.outline, fontFamily: 'monospace',
), fontSize: 12,
background: colorScheme.surfaceContainerLow, color: colorScheme.outline,
) ),
: GutterStyle.none, background: colorScheme.surfaceContainerLow,
textStyle: TextStyle( )
fontFamily: 'monospace', : GutterStyle.none,
fontSize: 13, textStyle: TextStyle(
height: 1.5, fontFamily: 'monospace',
color: colorScheme.onSurface, fontSize: 13,
height: 1.5,
color: colorScheme.onSurface,
),
padding: const EdgeInsets.all(16),
background: colorScheme.surfaceContainerLowest,
), ),
padding: const EdgeInsets.all(16),
background: colorScheme.surfaceContainerLowest,
), ),
); );
} }