atSourceSpan method

void atSourceSpan(
  1. SourceSpan span,
  2. ErrorCode errorCode, {
  3. List<Object>? arguments,
  4. List<DiagnosticMessage>? contextMessages,
  5. Object? data,
})

Report an error with the given errorCode and arguments. The span is used to compute the location of the error.

Implementation

void atSourceSpan(
  SourceSpan span,
  ErrorCode errorCode, {
  List<Object>? arguments,
  List<DiagnosticMessage>? contextMessages,
  Object? data,
}) {
  atOffset(
    errorCode: errorCode,
    offset: span.start.offset,
    length: span.length,
    arguments: arguments,
    contextMessages: contextMessages,
    data: data,
  );
}