CompletionItem class

CompletionItems are the suggestions returned from the completions request.

Constructors

CompletionItem({String? detail, required String label, int? length, int? selectionLength, int? selectionStart, String? sortText, int? start, String? text, CompletionItemType? type})
CompletionItem.fromMap(Map<String, Object?> obj)

Properties

detail → String?
A human-readable string with additional information about this item, like type or symbol information.
final
hashCode → int
The hash code for this object.
no setterinherited
label → String
The label of this completion item. By default this is also the text that is inserted when selecting this completion.
final
length → int?
Length determines how many characters are overwritten by the completion text and it is measured in UTF-16 code units. If missing the value 0 is assumed which results in the completion text being inserted.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectionLength → int?
Determines the length of the new selection after the text has been inserted (or replaced) and it is measured in UTF-16 code units. The selection can not extend beyond the bounds of the completion text. If omitted the length is assumed to be 0.
final
selectionStart → int?
Determines the start of the new selection after the text has been inserted (or replaced). selectionStart is measured in UTF-16 code units and must be in the range 0 and length of the completion text. If omitted the selection starts at the end of the completion text.
final
sortText → String?
A string that should be used when comparing this item with other items. If not returned or an empty string, the label is used instead.
final
start → int?
Start position (within the text attribute of the completions request) where the completion text is added. The position is measured in UTF-16 code units and the client capability columnsStartAt1 determines whether it is 0- or 1-based. If the start position is omitted the text is added at the location specified by the column attribute of the completions request.
final
text → String?
If text is returned and not an empty string, then it is inserted instead of the label.
final
type → String?
The item's type. Typically the client uses this information to render the item in the UI with an icon.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

canParse(Object? obj) → bool
fromJson(Map<String, Object?> obj) → CompletionItem