MyHorizontalTabStackView constructor
MyHorizontalTabStackView({
- Key? key,
- required List<
Tab> tabs, - required List<
Widget> contents, - double tabsHeight = 80,
- double tabsWidth = 200,
- Function? onSelectIdx,
- double indicatorWidth = 0.0,
- TextDirection direction = TextDirection.ltr,
- Color indicatorColor = Colors.transparent,
- bool disabledChangePageFromContentView = false,
- Axis contentScrollAxis = Axis.horizontal,
- Color selectedTabBackgroundColor = UIData.white,
- Color unselectedTabBackgroundColor = UIData.white,
- Color dividerColor = const Color(0xffe5e5e5),
- Curve changePageCurve = Curves.easeInOut,
- Duration changePageDuration = const Duration(milliseconds: 300),
- Color tabsShadowColor = Colors.black54,
- int initialIdx = 0,
- double tabsElevation = 1.0,
Implementation
MyHorizontalTabStackView(
{this.key,
required this.tabs,
required this.contents,
this.tabsHeight = 80,
this.tabsWidth = 200,
this.onSelectIdx,
this.indicatorWidth = 0.0,
this.direction = TextDirection.ltr,
this.indicatorColor = Colors.transparent,
this.disabledChangePageFromContentView = false,
this.contentScrollAxis = Axis.horizontal,
this.selectedTabBackgroundColor = UIData.white,
this.unselectedTabBackgroundColor = UIData.white,
this.dividerColor = const Color(0xffe5e5e5),
this.changePageCurve = Curves.easeInOut,
this.changePageDuration = const Duration(milliseconds: 300),
this.tabsShadowColor = Colors.black54,
this.initialIdx = 0,
this.tabsElevation = 1.0})
: assert(
tabs != null && contents != null && tabs.length == contents.length),
super(key: key);