Selaa lähdekoodia

修复首页显示空白问题

tags/0.0.1
Weller 4 vuotta sitten
vanhempi
commit
54d865297e
1 muutettua tiedostoa jossa 4 lisäystä ja 9 poistoa
  1. +4
    -9
      lib/util/widget_factory.dart

+ 4
- 9
lib/util/widget_factory.dart Näytä tiedosto

@@ -50,30 +50,25 @@ class WidgetFactory {
} }
} else { } else {
if (creater.isSliverChild()) { if (creater.isSliverChild()) {
return _createEmpty(isSliver);
return _createEmpty(false);
} else { } else {
return result; return result;
} }
} }
} else {
print('${name} 未注册');
} }
return _createEmpty(isSliver); return _createEmpty(isSliver);
} }


static List<Widget> _createEmpty(bool isSliver) { static List<Widget> _createEmpty(bool isSliver) {
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
if (!inProduction) {
return isSliver return isSliver
? [ ? [
SliverToBoxAdapter( SliverToBoxAdapter(
child: Container(),
child: Container(height: 0),
) )
] ]
: []; : [];
} else {
return isSliver
? [SliverToBoxAdapter(child: EmptyPage())]
: [EmptyPage()];
}
} }


/** /**


Ladataan…
Peruuta
Tallenna