setCollectionEnabled static method Null safety

Future<void> setCollectionEnabled(
  1. bool enable

Enable or disable collection (opt-in or opt-out)

If needed, you can set collectionEnabled to false via Instana's setup and enable the collection later. (e.g. after giving the consent) Note: Any instrumentation is ignored when setting collectionEnabled to false.


static Future<void> setCollectionEnabled(bool enable) async {
  await _channel.invokeMethod(
      'setCollectionEnabled', <String, dynamic>{'collectionEnabled': enable});