tabBar property
TabBar
get
tabBar
Implementation
TabBar get tabBar => TabBar(
labelColor: primaryColor,
unselectedLabelColor: primaryColor,
indicatorColor: Color(0xFFE083356),
indicatorWeight: 5,
labelStyle: TextStyle(
fontWeight: FontWeight.bold, fontSize: ScreenUtil().setWidth(15)),
unselectedLabelStyle: TextStyle(
fontWeight: FontWeight.normal, fontSize: ScreenUtil().setWidth(15)),
tabs: pollOption3 == null
? [
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions1VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption1!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions2VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption2!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
]
: pollOption3 != null && pollOption4 == null
? [
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions1VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption1!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions2VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption2!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions3VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption3!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
]
: [
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions1VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption1!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions2VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption2!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions3VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption3!,
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
Tab(
child: Column(
children: [
Padding(
padding: EdgeInsets.all(
ScreenUtil().setWidth(2.0),
),
child: Text(
this.pollOptions4VotesList!.length.toString(),
),
),
Flexible(
fit: FlexFit.loose,
child: Text(
pollOption4 ?? '',
softWrap: false,
overflow: TextOverflow.ellipsis,
),
),
],
),
),
],
);