|
|
@@ -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<Widget> _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()]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|