Showing
2 changed files
with
8 additions
and
2 deletions
1 | +import 'dart:convert'; | ||
2 | + | ||
3 | +import 'package:crypto/crypto.dart'; | ||
1 | import 'package:flutter/widgets.dart'; | 4 | import 'package:flutter/widgets.dart'; |
2 | 5 | ||
3 | import '../config/manager.dart'; | 6 | import '../config/manager.dart'; |
@@ -30,7 +33,7 @@ class ClickInfo { | @@ -30,7 +33,7 @@ class ClickInfo { | ||
30 | if (key != null && key is ValueKey) { | 33 | if (key != null && key is ValueKey) { |
31 | clickInfo._elementManualKey = (key).value; | 34 | clickInfo._elementManualKey = (key).value; |
32 | } else { | 35 | } else { |
33 | - clickInfo._elementManualKey = key?.toString() ?? ''; | 36 | + clickInfo._elementManualKey = key?.toString() ?? md5.convert(utf8.encode('${clickInfo._elementType}${clickInfo._elementPath}')).toString(); |
34 | } | 37 | } |
35 | clickInfo._ignore = AutoTrackConfigManager.instance.isIgnoreElement(key); | 38 | clickInfo._ignore = AutoTrackConfigManager.instance.isIgnoreElement(key); |
36 | if (key is AutoTrackElementKey && !clickInfo._ignore) { | 39 | if (key is AutoTrackElementKey && !clickInfo._ignore) { |
1 | +import 'dart:convert'; | ||
2 | + | ||
3 | +import 'package:crypto/crypto.dart'; | ||
1 | import 'package:flutter/material.dart'; | 4 | import 'package:flutter/material.dart'; |
2 | 5 | ||
3 | import '../config/config.dart'; | 6 | import '../config/config.dart'; |
@@ -12,8 +15,8 @@ class PageInfo { | @@ -12,8 +15,8 @@ class PageInfo { | ||
12 | PageInfo pageInfo = PageInfo._(PageTimer()); | 15 | PageInfo pageInfo = PageInfo._(PageTimer()); |
13 | pageInfo._pageKey = element.widget.runtimeType.toString(); | 16 | pageInfo._pageKey = element.widget.runtimeType.toString(); |
14 | pageInfo._pagePath = pageConfig.pagePath ?? route.settings.name ?? ''; | 17 | pageInfo._pagePath = pageConfig.pagePath ?? route.settings.name ?? ''; |
15 | - pageInfo._pageManualKey = pageConfig.pageID ?? ''; | ||
16 | pageInfo._pageTitle = pageConfig.pageTitle ?? pageInfo._findTitle(element) ?? ''; | 18 | pageInfo._pageTitle = pageConfig.pageTitle ?? pageInfo._findTitle(element) ?? ''; |
19 | + pageInfo._pageManualKey = pageConfig.pageID ?? md5.convert(utf8.encode('${pageInfo._pageKey}${pageInfo._pagePath}${pageInfo._pageTitle}')).toString(); | ||
17 | pageInfo.ignore = pageConfig.ignore; | 20 | pageInfo.ignore = pageConfig.ignore; |
18 | return pageInfo; | 21 | return pageInfo; |
19 | } | 22 | } |
-
Please register or login to post a comment