CodeLineEditingControllerDelegate class
A delegate controller for an editor field.
We can override some default behaviors of the controller.
Constructors
- CodeLineEditingControllerDelegate({required CodeLineEditingController delegate})
Properties
- baseLine → CodeLine
-
The code line at which the selection originates.
no setterinherited
- canRedo → bool
-
Whether the redo action can be performed.
no setterinherited
- canUndo → bool
-
Whether the undo action can be performed.
no setterinherited
- codeLines ↔ CodeLines
-
The current codes the user is editing.
getter/setter pairinherited
- composing ↔ TextRange
-
Get the range of code that is still being composed.
getter/setter pairinherited
- delegate ↔ CodeLineEditingController
-
getter/setter pairinherited
- endLine → CodeLine
-
The code line at which the selection ends.
no setterinherited
- extentLine → CodeLine
-
The code line at which the selection terminates.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isAllSelected → bool
-
Whether all the codes are selected.
no setterinherited
- isComposing → bool
-
Whether the code that is still being composed.
no setterinherited
- isEmpty → bool
-
Whether the code is empty.
no setterinherited
- lineCount → int
-
How many lines in the editor.
no setterinherited
- options → CodeLineOptions
-
Get the code line options.
no setterinherited
- preValue → CodeLineEditingValue?
-
Get the previous editing value.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedText → String
-
The current text being selected.
no setterinherited
- selection ↔ CodeLineSelection
-
Get the current editor code selections.
getter/setter pairinherited
- startLine → CodeLine
-
The code line at which the selection starts.
no setterinherited
- text ↔ String
-
The current text being edited.
getter/setter pairinherited
- textAsync ← String
-
Set the current editor text async.
no getterinherited
- unforldLineSelection → CodeLineSelection
-
Expanded code selections.
no setterinherited
- value ↔ CodeLineEditingValue
-
The current value stored in this notifier.
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
applyIndent(
) → void -
Insert a indent.
inherited
-
applyNewLine(
) → void -
Insert a newline character.
inherited
-
applyOutdent(
) → void -
Delete a indent.
inherited
-
bindEditor(
GlobalKey< State< key) → voidStatefulWidget> > -
Only used in internal.
inherited
-
buildTextSpan(
{required BuildContext context, required int index, required TextSpan textSpan, required TextStyle style}) → TextSpan -
Builds TextSpan from current editing value.
This can override the code syntax highlighting styles.
inherited
-
cancelSelection(
) → void -
The selection will be collaposed at the terminate position.
inherited
-
clearComposing(
) → void -
Set the composing region to an empty range.
inherited
-
collapseChunk(
int index, int end) → void -
Collapse codes form
start
toend
.inherited -
copy(
) → Future< void> -
If the selection is currently collapsed, the whole line will be copied.
Otherwise, copy the selected codes.
inherited
-
cut(
) → void -
If the selection is currently collapsed, the whole line will be cut.
Otherwise, cut the selected codes.
inherited
-
deleteBackward(
) → void -
If the selection is currently collapsed, the character behind the cursor will be deleted.
Otherwise, will delete the selection, same as deleteSelection.
inherited
-
deleteForward(
) → void -
If the selection is currently collapsed, the character in front of the cursor will be deleted.
Otherwise, will delete the selection, same as deleteSelection.
inherited
-
deleteSelection(
) → void -
Delete the selected codes.
inherited
-
deleteSelectionLines(
[bool keepExtentOffset = true]) → void -
Delete the selected lines.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
edit(
TextEditingValue newValue) → void -
Set the current editor value.
inherited
-
expandChunk(
int index) → void -
Expand the codes at
index
of lines.inherited -
extendSelection(
AxisDirection direction) → void -
Extend the selection to a direction.
inherited
-
extendSelectionToLineEnd(
) → void -
Extend the selection to the end of current line.
inherited
-
extendSelectionToLineStart(
) → void -
Extend the selection to the start of current line.
inherited
-
extendSelectionToPageEnd(
) → void -
Extend the selection to the end of document.
inherited
-
extendSelectionToPageStart(
) → void -
Extend the selection to the start of document.
inherited
-
extendSelectionToWordBoundaryBackward(
) → void -
Extend the selection to the end of the word.
inherited
-
extendSelectionToWordBoundaryForward(
) → void -
Extend the selection to the start of the word.
inherited
-
forceRepaint(
) → void -
Force the render to repaint.
inherited
-
index2lineIndex(
int index) → int -
Convert the
index
to the unforld line index.inherited -
lineIndex2Index(
int lineIndex) → CodeLineIndex -
Get code line information at
lineIndex
.inherited -
makeCursorCenterIfInvisible(
) → void -
Scroll the editor to make sure the cursor is visible at center.
inherited
-
makeCursorVisible(
) → void -
Scroll the editor to make sure the cursor is visible.
inherited
-
makePositionCenterIfInvisible(
CodeLinePosition position) → void -
Scroll the editor to make sure the given position is visible at center.
inherited
-
makePositionVisible(
CodeLinePosition position) → void -
Scroll the editor to make sure the given position is visible.
inherited
-
moveCursor(
AxisDirection direction) → void -
Move the cursor to a direction.
inherited
-
moveCursorToLineEnd(
) → void -
Move the cursor to the end of current line.
inherited
-
moveCursorToLineStart(
) → void -
Move the cursor to the start of current line.
inherited
-
moveCursorToPageDown(
) → void -
TODO
inherited
-
moveCursorToPageEnd(
) → void -
Move the cursor to the end of document.
inherited
-
moveCursorToPageStart(
) → void -
Move the cursor to the start of document.
inherited
-
moveCursorToPageUp(
) → void -
TODO
inherited
-
moveCursorToWordBoundaryBackward(
) → void -
Move the cursor to the end of the word.
inherited
-
moveCursorToWordBoundaryForward(
) → void -
Move the cursor to the start of the word.
inherited
-
moveSelectionLinesDown(
) → void -
Move down the selected code lines.
inherited
-
moveSelectionLinesUp(
) → void -
Move up the selected code lines.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
paste(
) → void -
Paste text from Clipboard.
inherited
-
redo(
) → void -
Updates the value on the stack to the next value.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
replaceAll(
Pattern pattern, String replacement) → void -
Replaces all substrings that match
pattern
withreplacement
.inherited -
replaceSelection(
String replacement, [CodeLineSelection? selection]) → void -
Replace the selected code with a new string
replacement
.inherited -
runRevocableOp(
VoidCallback op) → void -
Perform an operation. If the editor content changes, it will
be recorded in the undo history.
inherited
-
selectAll(
) → void -
Select all the codes.
inherited
-
selectLine(
int index) → void -
Select a code line at the given index.
inherited
-
selectLines(
int base, int extent) → void -
Select some code lines at the given start and end index.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transposeCharacters(
) → void -
Transpose characters.
inherited
-
undo(
) → void -
Reverts the value on the stack to the previous value.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited