envelope static method

Map<String, Object?> envelope(
  1. String type,
  2. String id,
  3. String ts,
  4. Map<String, Object?> fields,
)

Convenience envelope builder: zap/type/id/ts + fields.

Implementation

static Map<String, Object?> envelope(
  String type,
  String id,
  String ts,
  Map<String, Object?> fields,
) => <String, Object?>{
  'zap': zapProtocolVersion,
  'type': type,
  'id': id,
  'ts': ts,
  ...fields,
};