AdPrivacyConfig constructor
const
AdPrivacyConfig({
- bool? canUseLocation,
- double? latitude,
- double? longitude,
- bool? canUseAppTrackingConsent,
- String? devOaid,
- bool? canUsePhoneState,
- String? imei,
- bool? canUseWifiState,
- String? macAddress,
- bool? canUseWriteExternal,
- bool? canUseOaid,
- String? oaid,
- bool? canUseAndroidId,
- String? androidId,
- bool? canUseRecordAudio,
- bool? canUseMessage,
- bool? canUseAppList,
- List<
String> ? customAppList, - List<
String> ? customDeviceImeis, - Map<
String, String> ? userPrivacyConfig, - bool? canUseWifiBssid,
- String? customIdfa,
- bool? forbidIdfa,
- bool? allowUploadDeviceInfo,
- Map<
String, Object?> ? iosPrivacyConfig,
Implementation
const AdPrivacyConfig({
this.canUseLocation,
this.latitude,
this.longitude,
this.canUseAppTrackingConsent,
this.devOaid,
this.canUsePhoneState,
this.imei,
this.canUseWifiState,
this.macAddress,
this.canUseWriteExternal,
this.canUseOaid,
this.oaid,
this.canUseAndroidId,
this.androidId,
this.canUseRecordAudio,
this.canUseMessage,
this.canUseAppList,
this.customAppList,
this.customDeviceImeis,
this.userPrivacyConfig,
this.canUseWifiBssid,
this.customIdfa,
this.forbidIdfa,
this.allowUploadDeviceInfo,
this.iosPrivacyConfig,
}) : assert(
(latitude == null) == (longitude == null),
'latitude 和 longitude 必须同时设置',
),
assert(
latitude == null || (latitude >= -90 && latitude <= 90),
'latitude 必须在 -90 到 90 之间',
),
assert(
longitude == null || (longitude >= -180 && longitude <= 180),
'longitude 必须在 -180 到 180 之间',
);