Adds or updates one metric.
static void setMetric(String key, Object? value) { _values[key] = value?.toString() ?? 'null'; _emit(); }