buildTabButton method
Implementation
Widget buildTabButton() {
BoxDecoration boxDecorationTabNormal = BoxDecoration(
color: backgroundColor,
border: Border.all(width: 0.5, style: BorderStyle.solid, color: borderColor),
borderRadius: borderRadius);
BoxDecoration boxDecorationTabSelected = BoxDecoration(
color: selectedBackgroundColor,
border: Border.all(width: 0.5, style: BorderStyle.solid, color: selectedBorderColor),
borderRadius: borderRadius);
return GestureDetector(
child: Container(
width: size.width,
height: size.height,
decoration: this.isSelected ? boxDecorationTabSelected : boxDecorationTabNormal,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(top: 0, left: 5, right: 5, bottom: 0),
child: Text(
text,
textAlign: TextAlign.center,
style: TextStyle(
color: this.isSelected ? selectedTextColor : textColor,
fontSize: this.fontSize,
fontWeight: this.fontWeight,
),
)),
])),
onTap: () {
onClick();
});
}