TextEditor class

Represents an editor that is attached to a {@link TextDocumentdocument}.

Available extensions
Annotations
  • @JS()
  • @staticInterop
  • @anonymous

Constructors

TextEditor({TextDocument? document, Selection? selection, List<Selection>? selections, List<Range>? visibleRanges, TextEditorOptions? options, ViewColumn? viewColumn, Future edit(void (TextEditorEdit), [dynamic])?, Future insertSnippet(SnippetString, [Object?, dynamic])?, void setDecorations(TextEditorDecorationType, Object)?, void revealRange(Range, [TextEditorRevealType?])?, void show([ViewColumn?])?, void hide()?})
factory

Properties

document TextDocument

Available on TextEditor, provided by the TextEditor$Typings extension

The document associated with this text editor. The document will be the same for the entire lifetime of this text editor.
no setter
edit Future Function(void (TextEditorEdit), [dynamic])

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hide ↔ void Function()

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
insertSnippet Future Function(SnippetString, [Object?, dynamic])

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
options TextEditorOptions

Available on TextEditor, provided by the TextEditor$Typings extension

Text editor options.
getter/setter pair
revealRange ↔ void Function(Range, [TextEditorRevealType?])

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selection Selection

Available on TextEditor, provided by the TextEditor$Typings extension

The primary selection on this text editor. Shorthand for TextEditor.selections[0].
getter/setter pair
selections List<Selection>

Available on TextEditor, provided by the TextEditor$Typings extension

The selections in this text editor. The primary selection is always at index 0.
getter/setter pair
setDecorations ↔ void Function(TextEditorDecorationType, Object)

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
show ↔ void Function([ViewColumn?])

Available on TextEditor, provided by the TextEditor$Typings extension

getter/setter pair
viewColumn ViewColumn?

Available on TextEditor, provided by the TextEditor$Typings extension

The column in which this editor shows. Will be undefined in case this isn't one of the main editors, e.g. an embedded editor, or when the editor column is larger than three.
no setter
visibleRanges List<Range>

Available on TextEditor, provided by the TextEditor$Typings extension

The current visible ranges in the editor (vertically). This accounts only for vertical scrolling, and not for horizontal scrolling.
no setter

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