Explorar el Código

[modify]调整埋点toast提示

zk hace 1 año
padre
commit
df8201859e
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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);
   }