getFormattedText method

String getFormattedText({
  1. TimeFormat timeFormat = TimeFormat.timeAndSeconds,
})

This method allows you to get full text of logs in history with formatting

Implementation

String getFormattedText({
  TimeFormat timeFormat = TimeFormat.timeAndSeconds,
}) {
  final sb = StringBuffer();
  for (final data in this) {
    final text = data.generateTextMessage(timeFormat: timeFormat);
    sb.write('$text\n');
    sb.write(ConsoleUtils.getUnderline(30));
  }
  return sb.toString();
}