From 5b20d3b1820e5e3c69fd4c71d942624413175a52 Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Mon, 26 Apr 2021 17:02:34 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A4=96=E9=93=BE=E8=B7=B3=E8=BD=ACw?= =?UTF-8?q?ebView?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home_page/home_page.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/pages/home_page/home_page.dart b/lib/pages/home_page/home_page.dart index f746b40..e6b76f3 100644 --- a/lib/pages/home_page/home_page.dart +++ b/lib/pages/home_page/home_page.dart @@ -256,6 +256,11 @@ class _HomePageState extends State with WidgetsBindingObserver, Ticker if (_currentIndex == index) { return; } else { + /// 如果是外链,直接打开原生WebView + if (model?.skipIdentifier == 'pub.flutter.url') { + RouterUtil.openWebview(model?.url, context); + return; + } setState(() { _currentIndex = index; });