CodeCrafter class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CodeCrafter
Constructors
-
CodeCrafter({Key? key, required CodeCrafterController controller, String? initialText, String? filePath, FocusNode? focusNode, TextStyle? textStyle, GutterStyle? gutterStyle, Map<
String, TextStyle> ? editorTheme, AiCompletion? aiCompletion, TextStyle? aiCompletionTextStyle, LspConfig? lspConfig, OverlayStyle? suggestionStyle, OverlayStyle? hoverDetailsStyle, Color? selectionHandleColor, Color? selectionColor, Color? cursorColor, bool enableBreakPoints = true, bool enableFolding = true, bool enableRulerLines = true, bool enableSuggestions = true, bool enableGutterDivider = false, bool wrapLines = false, bool autoFocus = false, bool readOnly = false, int tabSize = 3, EdgeInsets innerPadding = EdgeInsets.zero, EditorField? editorField}) -
const
Properties
- aiCompletion → AiCompletion?
-
AI completion configuration for the CodeCrafter widget.
final
- aiCompletionTextStyle → TextStyle?
-
The text style to be applied to the AI completion text in the CodeCrafter widget.
final
- autoFocus → bool
-
Whether to enable auto focus on the CodeCrafter widget.
final
- controller → CodeCrafterController
-
The controller for the CodeCrafter widget.
final
- cursorColor → Color?
-
The color of the cursor in the CodeCrafter widget.
final
- editorField → EditorField?
-
The CodeCrafter widget uses TextField under the hood,
So the properties given to this EditorField class gets passed to the undelying TextField of CodeCrafter.
final
-
editorTheme
→ Map<
String, TextStyle> ? -
The theme for the editor, which can be used to customize the appearance of the CodeCrafter widget.
final
- enableBreakPoints → bool
-
Whether to enable breakpoints in the CodeCrafter widget.
final
- enableFolding → bool
-
Whether to enable folding in the CodeCrafter widget.
final
- enableGutterDivider → bool
-
whether to enable the vertical divider line between gutter and editor
final
- enableRulerLines → bool
-
Whether to enable ruler lines in the CodeCrafter widget.
Defaults to true.
final
- enableSuggestions → bool
-
Whether to enable suggestions in the CodeCrafter widget.
Defaults to true.
Not AI suggestions, but the suggestions from LSP or based on the text in the editor.
final
- filePath → String?
-
Optional but if provided, it will be used to load the initial text from a file.
final
- focusNode → FocusNode?
-
Focus node for the underlying TextField in the CodeCrafter widget.
final
- gutterStyle → GutterStyle?
-
The style for the gutter in the CodeCrafter widget.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hoverDetailsStyle → OverlayStyle?
-
The style for the LSP hover details overlay.
final
- initialText → String?
-
The initial text to be displayed in the CodeCrafter widget.
final
- innerPadding → EdgeInsets
-
The inner padding of the editable area inside the CodeCrafter widget.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- lspConfig → LspConfig?
-
LSP configuration for the CodeCrafter widget.
final
- readOnly → bool
-
Whether the CodeCrafter widget is read-only.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectionColor → Color?
-
The color of the selection in the CodeCrafter widget.
final
- selectionHandleColor → Color?
-
The color of the selection handle in the CodeCrafter widget.
final
- suggestionStyle → OverlayStyle?
-
The style for the LSP suggestions overlay.
final
- tabSize → int
-
tab size for the CodeCrafter widget.
final
- textStyle → TextStyle?
-
The text style to be applied to the text in the CodeCrafter widget.
final
- wrapLines → bool
-
Whether to wrap lines in the CodeCrafter widget.
Defaults to false.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< CodeCrafter> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited