diff --git a/lib/main_page.dart b/lib/main_page.dart index 7d4b03bf..02634123 100644 --- a/lib/main_page.dart +++ b/lib/main_page.dart @@ -351,12 +351,12 @@ class _MainPage extends State with WidgetsBindingObserver { } else { pushData = sharedPreferences.getString("pushData") ?? ""; } - if (pushData == null || pushData == "") return; - Map pushMap = jsonDecode(pushData); + if (pushData == "") return; + Map? pushMap = jsonDecode(pushData); if (pushMap != null) { String routeName = ""; Map params = {}; - switch (pushMap["typed"].toString()) { + switch (pushMap["typed"] ?? '') { case "1": case "ARTICLE": routeName = "/router/web_page";