소스 검색

[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);
   }