advertising_id

Creator: coderz1093

Last updated:

0 purchases

advertising_id Image
advertising_id Images
Add to Cart

Description:

advertising id

advertising_id #
A Flutter plugin to access advertising ID.
Wraps ASIdentifierManager.advertisingIdentifier (on iOS) and advertising ID (on Android).
Getting Started #
Run this command
flutter pub add advertising_id
copied to clipboard
This will add a line like this to your package's pubspec.yaml
dependencies:
....
advertising_id: ^2.7.1
copied to clipboard
Usage #
AdvertisingId.id #
Get advertising ID.
String? advertisingId;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
advertisingId = await AdvertisingId.id(true);
} on PlatformException {
advertisingId = null;
}
copied to clipboard
AdvertisingId.isLimitAdTrackingEnabled #
Retrieves whether the user has limit ad tracking enabled or not.
bool? isLimitAdTrackingEnabled;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
isLimitAdTrackingEnabled = await AdvertisingId.isLimitAdTrackingEnabled;
} on PlatformException {
isLimitAdTrackingEnabled = false;
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.