|
|
|
@ -37,6 +37,18 @@ class _RecommendTabState extends State<RecommendTab> |
|
|
|
final tabBarHeight = 64.0; |
|
|
|
final totalBottomPadding = bottomPadding + tabBarHeight; |
|
|
|
return Obx(() { |
|
|
|
if (controller.recommendIsLoading.value && controller.recommendFeed.isEmpty) { |
|
|
|
return Center( |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.center, |
|
|
|
children: [ |
|
|
|
CircularProgressIndicator(), |
|
|
|
SizedBox(height: 16), |
|
|
|
Text('加载数据中...'), |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
return EasyRefresh( |
|
|
|
controller: _refreshController, |
|
|
|
header: const ClassicHeader( |
|
|
|
@ -93,7 +105,7 @@ class _RecommendTabState extends State<RecommendTab> |
|
|
|
child: ListView.separated( |
|
|
|
// 关键:始终允许滚动,即使内容不足 |
|
|
|
// 移除顶部 padding,让刷新指示器可以正确显示在 AppBar 下方 |
|
|
|
padding: EdgeInsets.only(left: 12, right: 12, top: 12), |
|
|
|
padding: EdgeInsets.only(left: 12, right: 12), |
|
|
|
itemBuilder: (context, index) { |
|
|
|
// 空数据状态 |
|
|
|
if (controller.recommendFeed.isEmpty && index == 0) { |
|
|
|
|