getSuggestions2 method

Future<Suggestions2Result> getSuggestions2(
  1. String? file,
  2. int? offset,
  3. int? maxResults, {
  4. String? completionCaseMatchingMode,
  5. String? completionMode,
  6. int? invocationCount,
  7. int? timeout,
})

Request that completion suggestions for the given offset in the given file be returned. The suggestions will be filtered using fuzzy matching with the already existing prefix.

Implementation

Future<Suggestions2Result> getSuggestions2(
    String? file, int? offset, int? maxResults,
    {String? completionCaseMatchingMode,
    String? completionMode,
    int? invocationCount,
    int? timeout}) {
  final Map m = {'file': file, 'offset': offset, 'maxResults': maxResults};
  if (completionCaseMatchingMode != null) {
    m['completionCaseMatchingMode'] = completionCaseMatchingMode;
  }
  if (completionMode != null) m['completionMode'] = completionMode;
  if (invocationCount != null) m['invocationCount'] = invocationCount;
  if (timeout != null) m['timeout'] = timeout;
  return _call('completion.getSuggestions2', m)
      .then(Suggestions2Result.parse);
}