errorMessage property Null safety

String errorMessage

Implementation

String get errorMessage {
  final buffer = StringBuffer();
  var appendLineBreak = false;
  for (final line in responseLines) {
    if (line.isFailedStatus && line.message != null) {
      if (appendLineBreak) {
        buffer.write('\n');
      }
      buffer.write(line.message);
      appendLineBreak = true;
    }
  }
  return buffer.toString();
}