diff --git a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart index b90207eb..7ed8770f 100644 --- a/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart +++ b/frontend/mobile-app/lib/features/profile/presentation/pages/profile_page.dart @@ -201,8 +201,10 @@ class _ProfilePageState extends ConsumerState { _checkAndStartWalletPolling(); }); _loadAppInfo(); - // 通知数量(轻量级请求) - _loadUnreadNotificationCount(); + // 通知数量(轻量级请求)- 延迟到下一帧执行,避免在 build 期间修改 provider + WidgetsBinding.instance.addPostFrameCallback((_) { + _loadUnreadNotificationCount(); + }); // 启动定时刷新(可见区域的数据) _startAutoRefreshTimer(); }