handleEditGetFixes method
Future<EditGetFixesResult>
handleEditGetFixes(
- ResolvedUnitResult resolvedUnitResult,
- int offset
inherited
Obtains the list of fixes for the given offset.
Defaults to reading getLints
and obtaining their respective fixes.
Implementation
Future<analyzer_plugin.EditGetFixesResult> handleEditGetFixes(
ResolvedUnitResult resolvedUnitResult,
int offset,
) async {
return analyzer_plugin.EditGetFixesResult(
await getLints(resolvedUnitResult)
// Silence getLints errors. They should already be logged separately
.where((lint) =>
offset >= lint.location.offset &&
offset <= lint.location.offset + lint.location.length)
.handleError((_) {})
.asyncExpand((lint) => lint.handleGetAnalysisErrorFixes())
.toList(),
);
}