HTError constructor

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

HTError can not be created by default constructor.

Implementation

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