enableMetric static method

Future<void> enableMetric(
  1. String metric
)

Enables recording of a metric regardless of build settings. Must be called be before begin.

Valid values include "cpu", "memory", "logcat", "battery", "network-requests" A metric cannot be enabled and disabled at the same time, therefore if a metric is also disabled, the last call to enable to disable wins.

Implementation

static Future<void> enableMetric(String metric) async {
  TestFairyBase.prepareTwoWayInvoke();
  await TestFairyBase.channel.invokeMethod<void>('enableMetric', metric);
}