RequestContext constructor
RequestContext({})
Creates a request context. ipAddress and deviceId are required;
everything else is optional and defaults sensibly (e.g. timestamp
defaults to the current UTC time).
Implementation
RequestContext({
Map<String, String>? headers,
this.body,
this.userId,
required this.ipAddress,
required this.deviceId,
DateTime? timestamp,
Map<String, dynamic>? metadata,
}) : headers = headers ?? const {},
timestamp = timestamp ?? DateTime.now().toUtc(),
metadata = metadata ?? <String, dynamic>{};