HTAnalysisError constructor

HTAnalysisError(
  1. HTErrorCode code,
  2. HTErrorType type, {
  3. required String message,
  4. String? extra,
  5. List<String> interpolations = const [],
  6. String? correction,
  7. required String filename,
  8. required int line,
  9. required int column,
  10. int offset = 0,
  11. int length = 0,
  12. List<HTDiagnosticMessage> contextMessages = const [],
})

Implementation

HTAnalysisError(this.code, this.type,
    {required String message,
    this.extra,
    List<String> interpolations = const [],
    this.correction,
    required this.filename,
    required this.line,
    required this.column,
    this.offset = 0,
    this.length = 0,
    this.contextMessages = const []}) {
  for (var i = 0; i < interpolations.length; ++i) {
    message = message.replaceAll('{$i}', interpolations[i].toString());
  }
  _message = message;
}