getLabels method

List<Widget> getLabels()

Implementation

List<Widget> getLabels() {
  List<Widget> labels = [];
  for (var child in widget.children) {
    Widget lebs = Container(
      padding: const EdgeInsets.all(5),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          child.title,
          child.subTitle ?? Container(),
        ],
      ),
    );
    Widget tab = Tab(
      icon: child.selectedLeading,
      child: child.badgeCount == 0
          ? lebs
          : NotificationBadge(count: child.badgeCount ?? 0, child: lebs),
    );

    labels.add(
      child.tIOnTap == true
          ? InkWell(
              onTap: child.onTap,
              child: tab,
            )
          : tab,
    );
  }
  return labels;
}