reportAtOffset method

Diagnostic reportAtOffset(
  1. int offset,
  2. int length, {
  3. required DiagnosticCode diagnosticCode,
  4. List<Object> arguments = const [],
  5. List<DiagnosticMessage>? contextMessages,
})

Reports diagnosticCode at offset, with length, with message arguments and contextMessages.

The arguments are interpolated into the DiagnosticCode.problemMessage and DiagnosticCode.correctionMessage text. If present, the first argument (at position 0) replaces each instance of {0}, the second argument (at position 1) replaces each instance of {1}, etc.

Implementation

Diagnostic reportAtOffset(
  int offset,
  int length, {
  required DiagnosticCode diagnosticCode,
  List<Object> arguments = const [],
  List<DiagnosticMessage>? contextMessages,
}) => _reportAtOffset(
  offset,
  length,
  diagnosticCode: diagnosticCode,
  arguments: arguments,
  contextMessages: contextMessages,
);