소스 검색

修复首页显示空白问题

tags/0.0.1
Weller 4 년 전
부모
커밋
54d865297e
1개의 변경된 파일4개의 추가작업 그리고 9개의 파일을 삭제
  1. +4
    -9
      lib/util/widget_factory.dart

+ 4
- 9
lib/util/widget_factory.dart 파일 보기

@@ -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()];
}
}

/**


불러오는 중...
취소
저장