feat:更新朋友圈模块

This commit is contained in:
2025-07-23 23:00:30 +08:00
parent d9f1781277
commit 7da3ec9507
8 changed files with 193 additions and 82 deletions

View File

@@ -28,17 +28,19 @@ class _MomentPage extends State<MomentPage> {
});
}
@override
Widget build(BuildContext context) {
if (momentList.isEmpty) {
return const TDEmpty(type: TDEmptyType.plain, emptyText: '暂无数据');
} else {
return ListView.builder(
return Padding(
padding: EdgeInsets.all(5),
child: ListView.builder(
itemCount: momentList.length,
itemBuilder: (context, index) {
return MomentCard(moment: momentList[index]);
}
},
),
);
}
}

View File

@@ -39,31 +39,28 @@ class _RecordPageState extends State<RecordPage>
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.all(0),
child: Column(
children: [
TDTabBar(
tabs: tabs,
controller: _tabController,
backgroundColor: Colors.white,
showIndicator: true,
),
Expanded(
child: Padding(
padding: EdgeInsets.all(5),
child: TabBarView(
controller: _tabController,
children: [
RecipeList(),
RecipeCalendar(),
RecipeTimeline(),
],
),
return Column(
children: [
TDTabBar(
tabs: tabs,
controller: _tabController,
backgroundColor: Colors.white,
showIndicator: true,
),
Expanded(
child: Padding(
padding: EdgeInsets.all(5),
child: TabBarView(
controller: _tabController,
children: [
RecipeList(),
RecipeCalendar(),
RecipeTimeline(),
],
),
),
],
),
),
],
);
}
}