TUIAppTopBar constructor

TUIAppTopBar({
  1. Key? key,
  2. required List<TUIAppBarItem> items,
  3. ValueChanged<int>? onTap,
  4. int currentIndex = 0,
})

Implementation

TUIAppTopBar({
  super.key,
  required this.items,
  this.onTap,
  this.currentIndex = 0,
})  : assert(
          (items.every((element) => element.label?.isEmpty == false) ||
              items.every((element) =>
                  element.label == null ||
                  element.label?.trim().isEmpty == true)),
          "Either all items should have label or none."),
      _bnbItems = _convertToBnbItems(items),
      showLabels = items.any((element) =>
          element.label != null && element.label?.trim().isEmpty == false);