Commit 677bfbe3 authored by 林生雨's avatar 林生雨

commit

parent f6a8e0b6
......@@ -67,18 +67,9 @@ class _LevelTwoPageState extends BaseState<LevelTwoPage>
SliverPersistentHeader(
pinned: true,
delegate: StickyTabBarDelegate(
child: TabBar(
labelColor: Color(0xff282828),
labelStyle:
TextStyle(fontSize: 15.0, fontWeight: FontWeight.bold),
unselectedLabelColor: Color(0xffB5B5B5),
unselectedLabelStyle: TextStyle(fontSize: 15.0),
indicatorColor: Color(0xff4ABAB4),
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorPadding: EdgeInsets.only(left: 5.0, right: 5.0),
controller: this.tabController,
tabs: <Widget>[Tab(text: '医院'), Tab(text: '医生')]),
child: baseTabBar(tabController,
[baseTabBarItem("医院"), baseTabBarItem("医生")], (index) {},
scroll: false),
),
),
SliverFillRemaining(
......
......@@ -416,17 +416,14 @@ Widget baseTabBar(
);
}
Widget baseTabBarItem(
String text, {
double leftPadding,
double rightPadding,
}) {
Widget baseTabBarItem(String text,
{double leftPadding, double rightPadding, double wantWidth}) {
leftPadding = leftPadding ?? 28.0;
rightPadding = rightPadding ?? 28.0;
double width = leftPadding + text.length * 16.0 + rightPadding;
return Container(
height: 40,
width: width,
width: wantWidth ?? width,
alignment: Alignment.center,
child: Tab(
text: text,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment