logCustomNavigation method
void
logCustomNavigation({
记录自定义导航事件
Implementation
void logCustomNavigation({required String toPageName, String? fromPageName, required String navigationType, Map<String, dynamic>? params, Duration? stayDuration}) {
if (!_isSetup || _engine == null) return;
final event = NavigationEvent(
fromPage: fromPageName ?? 'unknown',
toPage: toPageName,
action: 'custom_$navigationType',
timestamp: DateTime.now(),
arguments: params,
stayDuration: stayDuration,
routeName: toPageName,
);
_queueEvent(event);
try {
SmartWidgetInterceptor.updatePageInfo(toPageName);
} catch (e) {
// 忽略更新错误
}
}