getAdvertisingId method
Retrieves the advertising ID of the device.
If requestTrackingAuthorization is set to true, it will request
tracking authorization from the user before retrieving the ID.
Returns a Future that resolves to the advertising ID as a String?.
If the ID cannot be retrieved, it resolves to null.
Implementation
Future<String?> getAdvertisingId([
bool requestTrackingAuthorization = false,
]) async {
return FlutterAdvertisingIdPlatform.instance.getAdvertisingId(
requestTrackingAuthorization,
);
}