|
|
@@ -37,7 +37,7 @@ class WidgetFactory { |
|
|
|
creater = widgetCreaters[name]; |
|
|
|
List<Widget> result = []; |
|
|
|
// if (type == WidgetType.normal) |
|
|
|
result = creater.createWidgets(model); |
|
|
|
result = creater.createWidgets(model); |
|
|
|
// else |
|
|
|
// result = creater.createSkeleton(model); |
|
|
|
if (isSliver) { |
|
|
@@ -50,21 +50,29 @@ class WidgetFactory { |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (creater.isSliverChild()) { |
|
|
|
return _createEmpty(); |
|
|
|
return _createEmpty(isSliver); |
|
|
|
} else { |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return _createEmpty(); |
|
|
|
return _createEmpty(isSliver); |
|
|
|
} |
|
|
|
|
|
|
|
static List<Widget> _createEmpty() { |
|
|
|
static List<Widget> _createEmpty(bool isSliver) { |
|
|
|
const bool inProduction = const bool.fromEnvironment("dart.vm.product"); |
|
|
|
if (!inProduction) { |
|
|
|
return []; |
|
|
|
return isSliver |
|
|
|
? [ |
|
|
|
SliverToBoxAdapter( |
|
|
|
child: Container(), |
|
|
|
) |
|
|
|
] |
|
|
|
: []; |
|
|
|
} else { |
|
|
|
return [EmptyPage()]; |
|
|
|
return isSliver |
|
|
|
? [SliverToBoxAdapter(child: EmptyPage())] |
|
|
|
: [EmptyPage()]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|