From aed7c61ba0481c270ab8107fe1249be0d740ddd0 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 5 Apr 2025 15:51:44 +0800 Subject: [PATCH] :bug: Fix android screenshot share issue --- lib/router.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/router.dart b/lib/router.dart index e5b6269..ecc7f2c 100644 --- a/lib/router.dart +++ b/lib/router.dart @@ -407,4 +407,10 @@ final appRouter = GoRouter( ), ), ], + onException: (context, state, router) { + if (state.error is GoException) { + router.goNamed('/'); + } + }, + navigatorKey: GlobalKey(), );