setCollectionEnabled static method
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.
Implementation
static Future<void> setCollectionEnabled(bool enable) async {
await _channel.invokeMethod(
'setCollectionEnabled', <String, dynamic>{'collectionEnabled': enable});
}