click method

void click(
  1. ClickInfo clickInfo
)

Implementation

void click(ClickInfo clickInfo) {
  if (!AutoTrackConfigManager.instance.autoTrackEnable) {
    return;
  }
  if (!AutoTrackConfigManager.instance.clickEnable) {
    return;
  }

  Map<String, dynamic> params = {};
  params['touch_x'] = clickInfo.touchX;
  params['touch_y'] = clickInfo.touchY;
  params['element_width'] = clickInfo.elementWidth;
  params['element_height'] = clickInfo.elementHeight;
  params['element_type'] = clickInfo.elementType;
  params['element_manual_key'] = clickInfo.elementManualKey;
  params['element_path'] = clickInfo.elementPath;
  params['texts'] = clickInfo.texts;
  _appendPageInfo(params, clickInfo.pageInfo);
  _TrackPlugin.click(params);
  AutoTrackLogger.getInstance().debug('track click => $params');
}