AdPrivacyConfig constructor

const AdPrivacyConfig({
  1. bool? canUseLocation,
  2. double? latitude,
  3. double? longitude,
  4. bool? canUseAppTrackingConsent,
  5. String? devOaid,
  6. bool? canUsePhoneState,
  7. String? imei,
  8. bool? canUseWifiState,
  9. String? macAddress,
  10. bool? canUseWriteExternal,
  11. bool? canUseOaid,
  12. String? oaid,
  13. bool? canUseAndroidId,
  14. String? androidId,
  15. bool? canUseRecordAudio,
  16. bool? canUseMessage,
  17. bool? canUseAppList,
  18. List<String>? customAppList,
  19. List<String>? customDeviceImeis,
  20. Map<String, String>? userPrivacyConfig,
  21. bool? canUseWifiBssid,
  22. String? customIdfa,
  23. bool? forbidIdfa,
  24. bool? allowUploadDeviceInfo,
  25. 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 之间',
     );