track method
Track a named event with optional properties.
Implementation
void track(String name, {Map<String, Object?>? properties}) {
onTracked?.call(name);
_queue.add({
'name': name,
if (properties != null || _cfg.defaultProperties.isNotEmpty)
'properties': {..._cfg.defaultProperties, ...?properties},
'timestamp': DateTime.now().toUtc().toIso8601String(),
});
}