attach method
Implementation
@override
Widget? attach(BuildContext context, TabLayoutController controller) {
return TabBar(
automaticIndicatorColorAdjustment: true,
controller: tabController,
dividerColor: null,
enableFeedback: null,
indicator: controller.tabIndicator,
indicatorColor: controller.tabIndicatorColor,
indicatorPadding: EdgeInsets.zero,
indicatorSize: controller.tabIndicatorFullWidth
? TabBarIndicatorSize.tab
: TabBarIndicatorSize.label,
indicatorWeight: controller.tabIndicatorHeight,
isScrollable: controller.tabMode == TabMode.scrollable,
key: key,
labelPadding: controller.tabMode == TabMode.scrollable
? controller.tabMargin
: null,
onTap: controller.setIndex,
overlayColor: null,
padding: null,
physics: null,
splashBorderRadius: null,
splashFactory: null,
tabs: List.generate(controller.tabs.length, (index) {
final item = controller.tabs.elementAt(index);
return TabView(
activated: index == controller.currentIndex,
contentColor: controller.tabContentColor,
contentColorState: controller.tabContentColorState,
icon: item.icon,
iconState: item.iconState,
iconSize: controller.tabIconSize,
iconSizeState: controller.tabIconSizeState,
iconSpace: controller.tabIconSpace,
iconTint: controller.tabIconTint,
iconTintState: controller.tabIconTintState,
inline: controller.tabInlineLabel,
title: item.title,
titleState: item.titleState,
titleSize: controller.tabTitleSize,
titleSizeState: controller.tabTitleSizeState,
titleWeight: controller.tabTitleWeight,
titleWeightState: controller.tabTitleWeightState,
onVisibleIconWhenTabSelected: controller.onTabIconVisibleWhenSelected,
onVisibleTitleWhenTabSelected:
controller.onTabTitleVisibleWhenSelected,
);
}),
);
}