FLUTTER ECOSYSTEM

operando/advertising_id

विज्ञापन ID तक पहुँचने के लिए एक Flutter प्लगइन।

advertising_id प्रोजेक्ट कवर
Stars
14
Forks
38
अंतिम पुश (UTC)
6 सित॰ 2024
प्रोजेक्ट स्थिति
आर्काइव
Shinobu Okano GitHub avatar
भाषाएँRubyKotlinDartSwiftObjective-CMakefile

तकनीकी विषय

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 1 आइटम
  • flutter{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

pub package

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

This will add a line like this to your package's pubspec.yaml

dependencies:
  ....
  advertising_id: ^2.7.1

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;
}
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;
}