AnalysisError.forValues constructor

AnalysisError.forValues({
  1. required Source source,
  2. required int offset,
  3. required int length,
  4. required ErrorCode errorCode,
  5. required String message,
  6. String? correctionMessage,
  7. List<DiagnosticMessage> contextMessages = const [],
  8. Object? data,
})

Initialize a newly created analysis error with given values.

Implementation

AnalysisError.forValues({
  required this.source,
  required int offset,
  required int length,
  required this.errorCode,
  required String message,
  String? correctionMessage,
  List<DiagnosticMessage> contextMessages = const [],
  this.data,
})  : _correctionMessage = correctionMessage,
      _contextMessages = contextMessages {
  _problemMessage = DiagnosticMessageImpl(
    filePath: source.fullName,
    length: length,
    message: message,
    offset: offset,
    url: null,
  );
}