defaultTabBar function
Implementation
Widget defaultTabBar({
required final List<TabBarViewModel> tabs,
required final Widget tabBar,
final double? width,
final double? height = 500,
final int initialIndex = 0,
}) =>
DefaultTabController(
initialIndex: initialIndex,
length: tabs.length,
child: Column(
children: <Widget>[
tabBar,
SizedBox(
width: width ?? screenWidth,
height: height,
child: TabBarView(
physics: const NeverScrollableScrollPhysics(),
children: tabs.map((final TabBarViewModel view) => view.view).toList(),
),
)
],
),
);