tabBars method

TabBar tabBars({
  1. List<Tab>? tabs,
  2. bool isScrollable = false,
  3. TabController? controller,
  4. EdgeInsetsGeometry labelPadding = const EdgeInsets.symmetric(horizontal: 0),
  5. EdgeInsetsGeometry indicatorPadding = const EdgeInsets.symmetric(horizontal: 0),
  6. CallbackData? callback,
})

Implementation

TabBar tabBars(
    {List<Tab>? tabs,
    bool isScrollable = false,
    TabController? controller,
    EdgeInsetsGeometry labelPadding =
        const EdgeInsets.symmetric(horizontal: 0),
    EdgeInsetsGeometry indicatorPadding =
        const EdgeInsets.symmetric(horizontal: 0),
    CallbackData? callback}) {
  return TabBar(
      controller: controller,
      isScrollable: isScrollable,
      indicatorColor: neutral_400,
      labelPadding: labelPadding,
      labelColor: primary,
      unselectedLabelStyle: normalStyle.copyWith(fontSize: fontSize12),
      labelStyle: normalStyle.copyWith(
          fontSize: fontSize12, fontWeight: FontWeight.w400),
      indicatorPadding: indicatorPadding,
      unselectedLabelColor: neutral_400,
      onTap: (index) {
        if (callback != null) {
          callback(index);
        }
      },
      indicator: const UnderlineTabIndicator(
          borderSide: BorderSide(width: 3.0, color: primary),
          insets: EdgeInsets.symmetric(horizontal: 16.0)),
      tabs: tabs ?? []);
}