From ddb84a6798569db9d4c034ddb3f91f1ca03b3112 Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Sat, 16 Jan 2021 13:06:16 +0800 Subject: [PATCH] update float button --- lib/pages/community/community_index.dart | 82 +++++++++++++----------- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/lib/pages/community/community_index.dart b/lib/pages/community/community_index.dart index 947be355..a6cea430 100644 --- a/lib/pages/community/community_index.dart +++ b/lib/pages/community/community_index.dart @@ -110,49 +110,59 @@ class _CommunityIndexState extends State return BeeScaffold( title: '社区', actions: _listActions(), - body: Column( + body: Stack( children: [ - Material( - color: kForeGroundColor, - child: PreferredSize( - preferredSize: Size.fromHeight(kToolbarHeight), - child: Align( - alignment: Alignment.centerLeft, - child: TabBar( - indicatorPadding: EdgeInsets.zero, - controller: _tabController, - isScrollable: true, - indicatorColor: Color(0xffFFd000), - indicatorWeight: 2.w, - indicatorSize: TabBarIndicatorSize.label, - unselectedLabelStyle: TextStyle( - color: Color(0xFF333333), - fontSize: 28.sp, - ), - labelStyle: TextStyle( - fontSize: 28.sp, - color: Color(0xff333333), - fontWeight: FontWeight.bold, - ), - tabs: List.generate( - tabs.length, - (index) => Tab( - text: tabs[index]['name'], + Column( + children: [ + Material( + color: kForeGroundColor, + child: PreferredSize( + preferredSize: Size.fromHeight(kToolbarHeight), + child: Align( + alignment: Alignment.centerLeft, + child: TabBar( + indicatorPadding: EdgeInsets.zero, + controller: _tabController, + isScrollable: true, + indicatorColor: Color(0xffFFd000), + indicatorWeight: 2.w, + indicatorSize: TabBarIndicatorSize.label, + unselectedLabelStyle: TextStyle( + color: Color(0xFF333333), + fontSize: 28.sp, + ), + labelStyle: TextStyle( + fontSize: 28.sp, + color: Color(0xff333333), + fontWeight: FontWeight.bold, + ), + tabs: List.generate( + tabs.length, + (index) => Tab( + text: tabs[index]['name'], + ), + ), ), ), ), ), - ), - ), - Expanded( - child: TabBarView( - controller: _tabController, - children: List.generate( - tabs.length, - (index) => TabList(index: index), + Expanded( + child: TabBarView( + controller: _tabController, + children: List.generate( + tabs.length, + (index) => TabList(index: index), + ), + ), ), - ), + // _floatingActionButton(), + ], ), + Positioned( + right: 30.w, + bottom: 50.w, + child: _floatingActionButton(), + ) ], ), );