|
|
|
@ -111,158 +111,160 @@ class _RecommendTabState extends State<RecommendTab> |
|
|
|
_refreshController.finishLoad(IndicatorResult.fail); |
|
|
|
} |
|
|
|
}, |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12), |
|
|
|
margin: EdgeInsets.only(bottom: 10.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 174.w, |
|
|
|
height: 126.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Stack( |
|
|
|
children: [ |
|
|
|
ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
child: CachedNetworkImage( |
|
|
|
imageUrl: "https://dating-agency-test.oss-accelerate.aliyuncs.com/1.png", |
|
|
|
width: 174.w, |
|
|
|
height: 84.w, |
|
|
|
fit: BoxFit.cover, |
|
|
|
child: SingleChildScrollView( |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12), |
|
|
|
margin: EdgeInsets.only(bottom: 10.w), |
|
|
|
child: Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Container( |
|
|
|
width: 174.w, |
|
|
|
height: 126.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Stack( |
|
|
|
children: [ |
|
|
|
ClipRRect( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
child: CachedNetworkImage( |
|
|
|
imageUrl: "https://dating-agency-test.oss-accelerate.aliyuncs.com/1.png", |
|
|
|
width: 174.w, |
|
|
|
height: 84.w, |
|
|
|
fit: BoxFit.cover, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
Positioned( |
|
|
|
child: Container( |
|
|
|
width: 47.w, |
|
|
|
height: 17.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
topLeft: Radius.circular(8.w), |
|
|
|
bottomRight: Radius.circular(8.w), |
|
|
|
Positioned( |
|
|
|
child: Container( |
|
|
|
width: 47.w, |
|
|
|
height: 17.w, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.only( |
|
|
|
topLeft: Radius.circular(8.w), |
|
|
|
bottomRight: Radius.circular(8.w), |
|
|
|
), |
|
|
|
color: const Color.fromRGBO(234, 57, 49, 1) |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"热门活动", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: Colors.white, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
color: const Color.fromRGBO(234, 57, 49, 1) |
|
|
|
), |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
"热门活动", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: Colors.white, |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.all(5.w), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"星河 DEEP--轻奢浪漫之旅", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 13.w, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.all(5.w), |
|
|
|
child: Column( |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"0人已报名", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"查看详情", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => EventList()); |
|
|
|
}), |
|
|
|
Container( |
|
|
|
width: 167.w, |
|
|
|
height: 126.w, |
|
|
|
padding: EdgeInsets.all(7.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"星河 DEEP--轻奢浪漫之旅", |
|
|
|
"金牌红娘", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 13.w, |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
fontSize: 13.w, |
|
|
|
fontWeight: FontWeight.w700 |
|
|
|
), |
|
|
|
), |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"0人已报名", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"查看详情", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
) |
|
|
|
Text( |
|
|
|
"查看更多", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => MatchmakerPage()); |
|
|
|
}) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => EventList()); |
|
|
|
}), |
|
|
|
Container( |
|
|
|
width: 167.w, |
|
|
|
height: 126.w, |
|
|
|
padding: EdgeInsets.all(7.w), |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.all(Radius.circular(8.w)), |
|
|
|
color: Colors.white |
|
|
|
), |
|
|
|
child: Column( |
|
|
|
children: [ |
|
|
|
Row( |
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
"金牌红娘", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 13.w, |
|
|
|
fontWeight: FontWeight.w700 |
|
|
|
), |
|
|
|
), |
|
|
|
Text( |
|
|
|
"查看更多", |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 9.w, |
|
|
|
color: const Color.fromRGBO(144, 144, 144, 1), |
|
|
|
fontWeight: FontWeight.w500 |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => MatchmakerPage()); |
|
|
|
}) |
|
|
|
], |
|
|
|
), |
|
|
|
Wrap( |
|
|
|
spacing: 14.w, |
|
|
|
runSpacing: 8.w, |
|
|
|
children: [ |
|
|
|
...controller.nearbyFeed.take(6).toList().map((e){ |
|
|
|
return MatchmakerItem(item: e); |
|
|
|
}) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
Wrap( |
|
|
|
spacing: 14.w, |
|
|
|
runSpacing: 8.w, |
|
|
|
children: [ |
|
|
|
...controller.nearbyFeed.take(6).toList().map((e){ |
|
|
|
return MatchmakerItem(item: e); |
|
|
|
}) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12), |
|
|
|
child: Image.asset( |
|
|
|
Assets.imagesBanner, |
|
|
|
width: 375.w - 24, |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => OpenWebView(url: "https://www.quzhaoqin.com/")); |
|
|
|
}), |
|
|
|
Expanded( |
|
|
|
child: ListView.separated( |
|
|
|
Container( |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12), |
|
|
|
child: Image.asset( |
|
|
|
Assets.imagesBanner, |
|
|
|
width: 375.w - 24, |
|
|
|
), |
|
|
|
).onTap((){ |
|
|
|
Get.to(() => OpenWebView(url: "https://www.quzhaoqin.com/")); |
|
|
|
}), |
|
|
|
ListView.separated( |
|
|
|
shrinkWrap: true, // ⭐ 关键 1:高度由内容决定 |
|
|
|
physics: const NeverScrollableScrollPhysics(), // ⭐ 关键 2:禁用自身滚动 |
|
|
|
// 关键:始终允许滚动,即使内容不足 |
|
|
|
// 移除顶部 padding,让刷新指示器可以正确显示在 AppBar 下方 |
|
|
|
padding: EdgeInsets.only(left: 12, right: 12), |
|
|
|
@ -305,9 +307,9 @@ class _RecommendTabState extends State<RecommendTab> |
|
|
|
}, |
|
|
|
// 至少显示一个 item(用于显示加载或空状态) |
|
|
|
itemCount: controller.recommendFeed.isEmpty ? 1 : controller.recommendFeed.length, |
|
|
|
), |
|
|
|
) |
|
|
|
], |
|
|
|
) |
|
|
|
], |
|
|
|
), |
|
|
|
) |
|
|
|
); |
|
|
|
}); |
|
|
|
|