Browse Source

[modify]调整埋点toast提示

zk 1 year ago
parent
commit
df8201859e
1 changed files with 5 additions and 1 deletions
  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);
   }