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