getSuggestionDetails2 method

Future<SuggestionDetails2Result> getSuggestionDetails2(
  1. String? file,
  2. int? offset,
  3. String? completion,
  4. String? libraryUri,
)

Clients must make this request when the user has selected a completion suggestion with the isNotImported field set to true. The server will respond with the text to insert, as well as any SourceChange that needs to be applied in case the completion requires an additional import to be added. The text to insert might be different from the original suggestion to include an import prefix if the library will be imported with a prefix to avoid shadowing conflicts in the file.

Implementation

Future<SuggestionDetails2Result> getSuggestionDetails2(
    String? file, int? offset, String? completion, String? libraryUri) {
  final Map m = {
    'file': file,
    'offset': offset,
    'completion': completion,
    'libraryUri': libraryUri
  };
  return _call('completion.getSuggestionDetails2', m)
      .then(SuggestionDetails2Result.parse);
}