getStatementCompletion method
Get the changes required to convert the partial statement at the given location into a syntactically valid statement. If the current statement is already valid the change will insert a newline plus appropriate indentation at the end of the line containing the offset. If a change that makes the statement valid cannot be determined (perhaps because it has not yet been implemented) the statement will be considered already valid and the appropriate change returned.
Implementation
@experimental
Future<StatementCompletionResult> getStatementCompletion(
String? file, int? offset) {
final Map m = {'file': file, 'offset': offset};
return _call('edit.getStatementCompletion', m)
.then(StatementCompletionResult.parse);
}