diff --git a/lib/pages/share/view.dart b/lib/pages/share/view.dart index c923320ea..82661486f 100644 --- a/lib/pages/share/view.dart +++ b/lib/pages/share/view.dart @@ -177,7 +177,7 @@ class _SharePanelState extends State { onTap: () async { _focusNode.unfocus(); UserModel? userModel = await Navigator.of(context).push( - GetPageRoute(page: ContactPage.new), + GetPageRoute(page: () => const ContactPage()), ); if (userModel != null) { _userList diff --git a/lib/pages/video/download_panel/view.dart b/lib/pages/video/download_panel/view.dart index 4f99e6a86..4f4da826d 100644 --- a/lib/pages/video/download_panel/view.dart +++ b/lib/pages/video/download_panel/view.dart @@ -528,7 +528,7 @@ class _DownloadPanelState extends State { _buildBottomBtn( text: '查看缓存', onTap: () => Navigator.of(context).push( - GetPageRoute(page: DownloadPage.new), + GetPageRoute(page: () => const DownloadPage()), ), ), ], diff --git a/lib/utils/page_utils.dart b/lib/utils/page_utils.dart index 7e2af9917..6f063a6c2 100644 --- a/lib/utils/page_utils.dart +++ b/lib/utils/page_utils.dart @@ -77,7 +77,7 @@ abstract class PageUtils { ); } else if (context.mounted) { UserModel? userModel = await Navigator.of(context).push( - GetPageRoute(page: ContactPage.new), + GetPageRoute(page: () => const ContactPage()), ); if (userModel != null) { selectedIndex = 0; @@ -710,7 +710,7 @@ abstract class PageUtils { } } - static Future? toVideoPage({ + static Future? toVideoPage({ VideoType videoType = VideoType.ugc, int? aid, String? bvid,