getErrorsForSource method

List<AnalysisError> getErrorsForSource(
  1. Source source
)

Return the errors collected by the listener for the given source.

Implementation

List<AnalysisError> getErrorsForSource(Source source) {
  if (_errors == null) {
    return const <AnalysisError>[];
  }
  return _errors!.where((error) => error.source == source).toList();
}