浏览代码

[modify]调整埋点toast提示

zk 1 年之前
父节点
当前提交
df8201859e
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      lib/handler/event_handler.dart

+ 5 - 1
lib/handler/event_handler.dart

@@ -9,7 +9,11 @@ class EventHandler {
 
   static void report(String eventId, {Map<String, dynamic>? params}) {
     if (isShowToast) {
-      ToastUtil.showToast('$eventId ${params?.toString()}');
+      if (params == null) {
+        ToastUtil.showToast(eventId);
+      } else {
+        ToastUtil.showToast('$eventId ${params.toString()}');
+      }
     }
     GravityHelper.report(eventId, params: params);
   }