CompletionItem class

A completion item represents a text snippet that is proposed to complete text that is being typed.

It is sufficient to create a completion item from just a {@link CompletionItem.labellabel}. In that case the completion item will replace the {@link TextDocument.getWordRangeAtPositionword} until the cursor with the given label or {@link CompletionItem.insertTextinsertText}. Otherwise the given {@link CompletionItem.textEditedit} is used.

When selecting a completion item in the editor its defined or synthesized text edit will be applied to all cursors/selections whereas {@link CompletionItem.additionalTextEditsadditionalTextEdits} will be applied as provided.

Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

CompletionItem(Object label, [CompletionItemKind? kind])
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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