MethodChannelCmpSdk class
An implementation of CmpSdkPlatform that communicates with native code through Flutter method channels for managing consent.
- Inheritance
-
- Object
- PlatformInterface
- CmpSdkPlatform
- MethodChannelCmpSdk
Constructors
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
- 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
-
check(
{bool isCached = false}) → Future< bool> -
Checks if consent is required, with an option to use cached results.
override
-
configureConsentLayer(
CmpUiConfig config) → 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
-
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
-
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) → Future< bool> -
Checks if there is consent for the specified purpose ID.
override
-
hasVendor(
String id) → Future< bool> -
Checks if there is consent for the specified vendor ID.
override
-
importCmpString(
String cmpString) → Future< bool> -
Imports a CMP string.
override
-
initializeCmp(
) → Future< void> -
Initializes the CMP instance.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
open(
) → 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
-
reset(
) → Future< void> -
Resets the consent data.
override
-
setCallbacks(
{ConsentCallback? onOpen, ConsentCallback? onClose, ConsentCallback? onNotOpened, ConsentErrorCallback? onError, ConsentButtonClickedCallback? onButtonClicked}) → Future< void> -
Sets up callbacks for consent events.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited