disableMetric static method

Future<void> disableMetric(
  1. String metric
)

Disables 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> disableMetric(String metric) async {
  TestFairyBase.prepareTwoWayInvoke();
  await TestFairyBase.channel.invokeMethod<void>('disableMetric', metric);
}