CodeEditor class

A lightweight, theme-aware plain-text code editor.

CodeEditor provides a monospace textarea, synchronized line numbers, and controller support without rebuilding its parent for every keystroke. It is intended for configuration files, source snippets, JSON, YAML, and similar plain-text content. It does not provide syntax highlighting.

Inheritance

Constructors

CodeEditor({String? label, String? name, TextEditingController? controller, Object? value, String? placeholder, bool required = false, bool disabled = false, bool readonly = false, bool showLineNumbers = true, Object height = 320, InputVariant variant = InputVariant.outline, ComponentSize size = ComponentSize.md, String? error, FormErrors? errors, String? helpText, String? className, Map<String, Object?> props = const {}, Map<String, Object?> editorProps = const {}, Map<String, Object?> style = const {}, Map<String, Object?> editorStyle = const {}, DartStyle? dartStyle, DartStyle? editorDartStyle, void onChanged(String value)?})
Creates a plain-text code editor.

Properties

children List<FlintNode>
Child nodes rendered inside the element.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
props Map<String, Object?>
Element attributes, event handlers, classes, and styles.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag String
HTML tag name for this element.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited