HTAnalysisError constructor

HTAnalysisError(
  1. ErrorCode code,
  2. ErrorType type, {
  3. 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,
    {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 []}) {
  if (message != null) {
    for (var i = 0; i < interpolations.length; ++i) {
      message = message!.replaceAll('{$i}', interpolations[i].toString());
    }
    _message = message;
  }
}