TabItem constructor
TabItem({})
Constructor for TabItem widget.
Parameters:
- selected: Indicates if the tab is selected.
- callbackFunction: Callback function called when the tab is clicked.
- textColor: Color used for the text inside the tab.
- iconColor: Color used as the icon color of the tab.
- inactiveColor: Color used as inactive color if
tabData.color
is null. - tabData: TabData used to set the data of the tab.
- backGroundGradientColor: Gradient used as the background gradient color of the tab.
- tabStyle: Style of the tab, default is CubertoTabStyle.styleNormal.
Implementation
TabItem({
super.key,
required this.selected,
required this.callbackFunction,
required this.textColor,
required this.iconColor,
required this.inactiveColor,
required this.tabData,
this.backGroundGradientColor,
this.tabStyle = CubertoTabStyle.styleNormal,
}) {
_iconData = tabData.iconData;
_title = tabData.title;
_tabColor = tabData.tabColor ?? inactiveColor;
_borderRadius = tabData.borderRadius ??
const BorderRadius.all(
Radius.circular(20.0),
);
}