TUIAppTopBar constructor
TUIAppTopBar({
- Key? key,
- required List<
TUIAppBarItem> items, - ValueChanged<
int> ? onTap, - 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);