encodedEvents method

List<BugCapsuleEvent> encodedEvents()

Round-trips the captured events through the capsule JSON encoding, as an upload and download would.

Implementation

List<BugCapsuleEvent> encodedEvents() => [
  for (final e in _events)
    BugCapsuleEvent.fromJson(
      (jsonDecode(jsonEncode(e.toJson())) as Map).cast<String, Object?>(),
    ),
];