setConsent static method
Set the Google Ads consent state, normally from your Consent Management Platform. Supported on iOS and Android.
Implementation
static Future<void> setConsent(LRConsent consent) async {
try {
await _channel.invokeMethod('setConsent', consent.toJSON());
developer.log('Consent set successfully', name: packageName);
} on PlatformException catch (e) {
developer.log('Failed to set consent: ${e.message}',
error: e, name: packageName);
rethrow;
}
}