From aff2afd5b03426dfb3693a03157de35ec6b2d757 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 19 Feb 2026 17:51:59 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F=E6=B6=88=E5=A4=B1=E9=97=AE=E9=A2=98=20-=20BottomNavig?= =?UTF-8?q?ationBar=20=E6=B7=BB=E5=8A=A0=20type:=20fixed=20=E5=92=8C?= =?UTF-8?q?=E9=80=89=E4=B8=AD=E9=A2=9C=E8=89=B2=20-=20activity=5Flist=5Fsc?= =?UTF-8?q?reen=20=E7=A7=BB=E9=99=A4=E5=B5=8C=E5=A5=97=20Scaffold?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/screens/activity_list_screen.dart | 32 +++++++++++++++------------ lib/screens/main_screen.dart | 3 +++ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/screens/activity_list_screen.dart b/lib/screens/activity_list_screen.dart index f7bf091..70c68e6 100644 --- a/lib/screens/activity_list_screen.dart +++ b/lib/screens/activity_list_screen.dart @@ -78,23 +78,27 @@ class _ActivityListScreenState extends State { @override Widget build(BuildContext context) { - return Scaffold( - backgroundColor: const Color(0xFFFFF8F0), - appBar: AppBar( - title: Text('伴享', style: TextStyle(fontWeight: FontWeight.bold)), - centerTitle: true, - actions: [ - IconButton( - icon: Icon(Icons.search), - onPressed: () {}, - ), - IconButton( - icon: Icon(Icons.notifications_none), - onPressed: () {}, + return Container( + color: const Color(0xFFFFF8F0), + child: Column( + children: [ + AppBar( + title: Text('伴享', style: TextStyle(fontWeight: FontWeight.bold)), + centerTitle: true, + actions: [ + IconButton( + icon: Icon(Icons.search), + onPressed: () {}, + ), + IconButton( + icon: Icon(Icons.notifications_none), + onPressed: () {}, + ), + ], ), + Expanded(child: _buildFeed()), ], ), - body: _buildFeed(), ); } diff --git a/lib/screens/main_screen.dart b/lib/screens/main_screen.dart index 26c3209..be9cb3c 100644 --- a/lib/screens/main_screen.dart +++ b/lib/screens/main_screen.dart @@ -32,8 +32,11 @@ class _MainScreenState extends State { floatingActionButton: _buildGlobalFab(), floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked, bottomNavigationBar: BottomNavigationBar( + type: BottomNavigationBarType.fixed, currentIndex: _currentIndex, onTap: (i) => setState(() => _currentIndex = i), + selectedItemColor: const Color(0xFFFF6B35), + unselectedItemColor: const Color(0xFF999999), items: const [ BottomNavigationBarItem(icon: Icon(Icons.home_outlined), activeIcon: Icon(Icons.home), label: '首页'), BottomNavigationBarItem(icon: Icon(Icons.people_outline), activeIcon: Icon(Icons.people), label: '好友'),