updateTrackingConsent static method
The SDK changes its behavior according to the new trackingConsent
value. For example, if the current tracking consent is .pending
:
and it is changed to .granted
, the SDK will send all current and
future data to Datadog; if changed to .notGranted
, the SDK will
wipe all current data and will not collect any future data.
This is not invoked and resolves silently when using Flutter web.
Implementation
static Future<void> updateTrackingConsent(
TrackingConsent trackingConsent,
) async {
return await channel.invokeMethod('updateTrackingConsent', {
'trackingConsent': trackingConsent.index,
});
}