getTabs method

List<Widget> getTabs()

Implementation

List<Widget> getTabs() {
  List<Widget> tabs = [];
  for (var child in widget.children) {
    if (child.children!.isNotEmpty && child.children != null) {
      tabs.add(
        TopTabBar(
          children: child.children!,
          indicator: widget.indicator,
          initialIndex: widget.initialIndex,
          primaryTabBar: widget.primaryTabBar,
          animationDuration: widget.animationDuration,
          automaticIndicatorColorAdjustment:
              widget.automaticIndicatorColorAdjustment,
          dividerColor: widget.dividerColor,
          dragStartBehavior: widget.dragStartBehavior,
          enableFeedback: widget.enableFeedback,
          indicatorColor: widget.indicatorColor,
          indicatorPadding: widget.indicatorPadding,
          indicatorSize: widget.indicatorSize,
          indicatorWeight: widget.indicatorWeight,
          isScrollable: widget.isScrollable,
          labelPadding: widget.labelPadding,
          mouseCursor: widget.mouseCursor,
          onTap: (value) => widget.onTap!(value),
          overlayColor: widget.overlayColor,
          padding: widget.padding,
          physics: widget.physics,
          splashBorderRadius: widget.splashBorderRadius,
          splashFactory: widget.splashFactory,
          tabBarViewClipBehavior: widget.tabBarViewClipBehavior,
          tabBarViewDragStartBehavior: widget.tabBarViewDragStartBehavior,
          tabBarViewPhysics: widget.tabBarViewPhysics,
          tabBarViewViewportFraction: widget.tabBarViewViewportFraction,
          labelColor: widget.labelColor ?? Theme.of(context).primaryColor,
          labelStyle: widget.labelStyle,
          unselectedLabelColor: widget.unselectedLabelColor,
          unselectedLabelStyle: widget.unselectedLabelStyle,
          tabAlignment: widget.tabAlignment,
        ),
      );
    } else {
      tabs.add(
        child.tab ??
            const Center(
              child: Text(
                  "No specified widget for this tab in the TabItem, please provide one in the list<TabItem> children."),
            ),
      );
    }
  }
  return tabs;
}