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