From 3948eeeea75745e14a2253dfa3374b7a6bbdd7ec Mon Sep 17 00:00:00 2001 From: Weller <1812208341@qq.com> Date: Sat, 14 Nov 2020 17:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A6=96=E6=AC=A1=E6=95=B0=E6=8D=AE=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BAloading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/widgets/home/home_goods/home_goods.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/widgets/home/home_goods/home_goods.dart b/lib/widgets/home/home_goods/home_goods.dart index 45fce58..4273ac6 100644 --- a/lib/widgets/home/home_goods/home_goods.dart +++ b/lib/widgets/home/home_goods/home_goods.dart @@ -53,6 +53,7 @@ class _HomeGoodsContainerState extends State<_HomeGoodsContainer> { HomeGoodsBloc _bloc; String _provider = ''; HomeGoodsStyleModel _style; + bool _isFirstLoading = true; @override void initState() { @@ -63,7 +64,11 @@ class _HomeGoodsContainerState extends State<_HomeGoodsContainer> { _style = HomeGoodsStyleModel.fromJson(Map.from(json)); widget.eventBus.on().listen((data) { - Loading.show(context); + if (!_isFirstLoading) { + // 老板说打开app的时候,第一次加载不要显示loading + Loading.show(context); + } + _isFirstLoading = false; _provider = data.provider; _bloc.loadMore(_provider); });