toJson method

Map<String, dynamic> toJson()

Serializes to JSON for DevTools transport, bug reports, and snapshot storage.

Implementation

Map<String, dynamic> toJson() => {
      'id': id,
      'parentId': parentId,
      'type': type.name,
      'description': description,
      'timestamp': timestamp.toIso8601String(),
      'metadata': metadata,
      'duration_ms': duration?.inMilliseconds,
    };