addMessage method

OutputLog addMessage(
  1. CapturedOutputMsg msg
)

Returns a new OutputLog with a CapturedOutputMsg appended.

Convenience method that creates an OutputLogEntry from a CapturedOutputMsg and appends it.

Implementation

OutputLog addMessage(CapturedOutputMsg msg) {
  return add(
    OutputLogEntry(
      line: msg.line,
      source: msg.source,
      timestamp: DateTime.now(),
    ),
  );
}