setMetric method

void setMetric(
  1. String key,
  2. Object? value
)

Adds or updates one custom overlay metric line.

Implementation

void setMetric(String key, Object? value) {
  inject(
    RenderMetricsInjection(
      upsertEntries: <String, String>{key: value?.toString() ?? 'null'},
    ),
  );
}