From 54d865297e5845ac10621eb586542e96d6c65e58 Mon Sep 17 00:00:00 2001 From: Weller <1812208341@qq.com> Date: Mon, 14 Sep 2020 13:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E7=A9=BA=E7=99=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/widget_factory.dart | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/util/widget_factory.dart b/lib/util/widget_factory.dart index 9820b11..dd7002f 100644 --- a/lib/util/widget_factory.dart +++ b/lib/util/widget_factory.dart @@ -50,30 +50,25 @@ class WidgetFactory { } } else { if (creater.isSliverChild()) { - return _createEmpty(isSliver); + return _createEmpty(false); } else { return result; } } + } else { + print('${name} 未注册'); } return _createEmpty(isSliver); } static List _createEmpty(bool isSliver) { - const bool inProduction = const bool.fromEnvironment("dart.vm.product"); - if (!inProduction) { return isSliver ? [ SliverToBoxAdapter( - child: Container(), + child: Container(height: 0), ) ] : []; - } else { - return isSliver - ? [SliverToBoxAdapter(child: EmptyPage())] - : [EmptyPage()]; - } } /**