MethodChannelCmpSdk class

An implementation of CmpSdkPlatform that communicates with native code through Flutter method channels for managing consent.

Inheritance

Constructors

MethodChannelCmpSdk()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
final
onButtonClicked ConsentButtonClickedCallback?
getter/setter pair
onClose ConsentCallback?
getter/setter pair
onError ConsentErrorCallback?
getter/setter pair
onGoogleConsentUpdated OnGoogleConsentUpdated?
getter/setter pair
onNotOpened ConsentCallback?
getter/setter pair
onOpen ConsentCallback?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptAll() Future<void>
Accepts all consents.
override
addEventListeners({ConsentCallback? onOpen, ConsentCallback? onClose, ConsentCallback? onNotOpened, ConsentErrorCallback? onError, ConsentButtonClickedCallback? onButtonClicked, OnGoogleConsentUpdated? onGoogleConsentUpdated}) Future<void>
Sets up callbacks for consent events.
override
check({bool isCached = false}) Future<bool>
Checks if consent is required, with an option to use cached results.
override
configureConsentLayer({ScreenConfig config = ScreenConfig.fullScreen}) Future<void>
Configures the consent layer with the specified UI configuration.
override
consentRequestedToday() Future<bool>
Checks if consent has been requested today.
override
createInstance(String id, String domain, String appName, String language) Future<void>
Creates a CMP instance with the provided configuration.
override
createInstanceWithConfig(CmpConfig config) Future<void>
Creates an instance of CMP with the specified configuration.
override
disablePurposes(List<String> purposes, {bool updateVendors = true}) Future<void>
Disable given List of Purposes
override
disableVendors(List<String> vendors) Future<void>
Disable given List of Vendors
override
enablePurposes(List<String> purposes, {bool updateVendors = true}) Future<void>
Enable given List of Purposes
override
enableVendors(List<String> vendors) Future<void>
Enable given List of Vendors
override
exportCmpString() Future<String?>
Exports the current CMP string.
override
getAllPurposes() Future<List>
Retrieves a list of all purposes.
override
getAllVendors() Future<List>
Retrieves a list of all vendors.
override
getDisabledPurposes() Future<List>
Retrieves a list of disabled purposes.
override
getDisabledVendors() Future<List>
Retrieves a list of disabled vendors.
override
getEnabledPurposes() Future<List>
Retrieves a list of enabled purposes.
override
getEnabledVendors() Future<List>
Retrieves a list of enabled vendors.
override
getGoogleACString() Future<String?>
Retrieves the Google AC string.
override
getLastATTRequestDate() Future<DateTime>
Get last Date of ATTRacking request
override
getPlatformVersion() Future<String?>
Retrieves the platform version.
override
getUSPrivacyString() Future<String?>
Retrieves the US privacy string.
override
hasConsent() Future<bool>
Checks if consent has been given.
override
hasPurpose(String id, {bool defaultReturn = true}) Future<bool>
Checks if there is consent for the specified purpose ID.
override
hasVendor(String id, {bool defaultReturn = true}) Future<bool>
Checks if there is consent for the specified vendor ID.
override
importCmpString(String cmpString) Future<bool>
Imports a CMP string.
override
initialize() Future<void>
initialize CMP
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openConsentLayer() Future<void>
Opens the consent layer.
override
openConsentLayerOnCheck() Future<void>
Opens the consent layer if consent is required and hasn't been given yet.
override
rejectAll() Future<void>
Rejects all consents.
override
requestATTPermission() Future<void>
request ATTPermission
override
reset() Future<void>
Resets the consent data.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited