From 2adbbd87bddc8aa7c994bee50118c7520e51534d Mon Sep 17 00:00:00 2001 From: PH2 <1293456824@qq.com> Date: Wed, 31 Mar 2021 10:02:07 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=A8=A1=E7=89=88=E6=9B=B4=E6=96=B0b?= =?UTF-8?q?ug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/custom_page/custom_item_page.dart | 4 +--- lib/widgets/restart_widget/restart_widget.dart | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/pages/custom_page/custom_item_page.dart b/lib/pages/custom_page/custom_item_page.dart index 4412267..7620bde 100644 --- a/lib/pages/custom_page/custom_item_page.dart +++ b/lib/pages/custom_page/custom_item_page.dart @@ -137,9 +137,7 @@ class __CustomItemPageContainerState extends State<_CustomItemPageContainer> wit if (current is CustomItemPageAppRestartState) { // 重启App Logger.log('开始重新启动App CustomItemPageAppRestartState'); - Timer(Duration(milliseconds: 1000), () { - EventUtil.instance.fire(ReloadEvent()); - }); + EventUtil.instance.fire(ReloadEvent()); return false; } return true; diff --git a/lib/widgets/restart_widget/restart_widget.dart b/lib/widgets/restart_widget/restart_widget.dart index 703063a..2ac7ba2 100644 --- a/lib/widgets/restart_widget/restart_widget.dart +++ b/lib/widgets/restart_widget/restart_widget.dart @@ -68,11 +68,11 @@ class _RestartWidgetState extends State { @override Widget build(BuildContext context) { - const bool inProduction = const bool.fromEnvironment("dart.vm.product"); - if (!inProduction) { - ///debug阶段可重启 - isFirst=true; - } + // const bool inProduction = const bool.fromEnvironment("dart.vm.product"); + // if (!inProduction) { + // ///debug阶段可重启 + // isFirst=true; + // } return StreamBuilder(stream: outData,builder: (context,asyn){ if(asyn.data==null&&!isFirst){ return Scaffold(