Browse Source

no message

ios
ZHR007 4 months ago
parent
commit
1e8c2d9b8e
2 changed files with 14 additions and 2 deletions
  1. 2
      lib/pages/home/nearby_tab.dart
  2. 14
      lib/pages/home/recommend_tab.dart

2
lib/pages/home/nearby_tab.dart

@ -94,7 +94,7 @@ class _NearbyTabState extends State<NearbyTab> with AutomaticKeepAliveClientMixi
height: MediaQuery.of(context).size.height - totalBottomPadding,
child: ListView.separated(
// padding AppBar
padding: EdgeInsets.only(left: 12, right: 12, bottom: 12),
padding: EdgeInsets.only(left: 12, right: 12),
itemBuilder: (context, index) {
//
if (controller.nearbyFeed.isEmpty && index == 0) {

14
lib/pages/home/recommend_tab.dart

@ -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) {

Loading…
Cancel
Save