sendMobileSignals static method
Implementation
static Future<bool> sendMobileSignals() async{
var context = DataDomeInterceptor.payloadInitializer["context"];
if(DataDomeInterceptor.deviceInfos.isEmpty) {
Map<String, dynamic> payloadData = await EventTracker().initPlatformState();
payloadData["request"] = getCookieDomain();
payloadData["ddk"] = DataDomeInterceptor.payloadInitializer["dataDomeKey"];
payloadData["cid"] = parseCookieValue(lastCookieValue);
MediaQueryData? media = MediaQuery.maybeOf(context);
if(media != null) {
payloadData["screen_x"] = media.size.width.toStringAsFixed(3);
payloadData["screen_y"] = media.size.height.toStringAsFixed(3);
payloadData["screen_d"] = media.devicePixelRatio;
}
EventTracker().setDeviceData = payloadData;
EventTracker().sendEventPayload();
return true;
}
return false;
}