fix: 尝试解决网络异常导致的白屏 issues #67

This commit is contained in:
guozhigq
2023-09-07 20:03:48 +08:00
parent 392980f0e8
commit 69f846760d
8 changed files with 29 additions and 3 deletions

View File

@ -212,6 +212,9 @@ class _DynamicsPageState extends State<DynamicsPage>
future: _futureBuilderFutureUp,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.data == null) {
return const SliverToBoxAdapter(child: SizedBox());
}
Map data = snapshot.data;
if (data['status']) {
return Obx(() => UpPanel(_dynamicsController.upData.value));
@ -232,6 +235,9 @@ class _DynamicsPageState extends State<DynamicsPage>
future: _futureBuilderFuture,
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.data == null) {
return const SliverToBoxAdapter(child: SizedBox());
}
Map data = snapshot.data;
if (data['status']) {
List<DynamicItemModel> list =