@@ -3,7 +3,8 @@ import 'package:flutter/material.dart'; | |||||
abstract class WidgetCreater { | abstract class WidgetCreater { | ||||
List<Widget> createWidgets(Map<String, dynamic> model); | List<Widget> createWidgets(Map<String, dynamic> model); | ||||
List<Widget> createSkeleton(Map<String, dynamic> model); | |||||
// 去除骨架屏返回,由widget内部实现是否展示与关闭 | |||||
// List<Widget> createSkeleton(Map<String, dynamic> model); | |||||
bool isSliverChild() { | bool isSliverChild() { | ||||
return false; | return false; | ||||
@@ -37,10 +37,10 @@ class WidgetFactory { | |||||
if (widgetCreaters.containsKey(name)) { | if (widgetCreaters.containsKey(name)) { | ||||
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 | |||||
result = creater.createSkeleton(model); | |||||
// else | |||||
// result = creater.createSkeleton(model); | |||||
if (isSliver) { | if (isSliver) { | ||||
if (creater.isSliverChild()) { | if (creater.isSliverChild()) { | ||||
return result; | return result; | ||||
@@ -15,6 +15,10 @@ export 'util/widget_factory.dart'; | |||||
export 'util/router_util.dart'; | export 'util/router_util.dart'; | ||||
export 'util/log/let_log.dart'; | export 'util/log/let_log.dart'; | ||||
// 屏幕适配 | |||||
export 'package:flutter_screenutil/flutter_screenutil.dart'; | |||||
export 'util/enum_util.dart'; | export 'util/enum_util.dart'; | ||||
export 'util/encode_util.dart'; | export 'util/encode_util.dart'; | ||||