toBottomNavigationBarItem method
Creates a BottomNavigationBarItem for this OudsNavigationBarItem.
This is intended to be used by OudsTabBar, which is backed by Cupertino's CupertinoTabBar (iOS-style tab bar) and therefore expects a list of BottomNavigationBarItem.
context: BuildContext to access theme and layout.controlStateto drive icon/top-indicator colors,isSelectedfor the destination selection state.
Implementation
BottomNavigationBarItem toBottomNavigationBarItem(
BuildContext context,
OudsNavigationBarControlState controlState, {
required bool isSelected,
}) {
final modifier = OudsNavigationBarStatusModifier(context);
return BottomNavigationBarItem(
label: label,
icon: _buildBadgeIconBottomNavigationBarItem(context, icon, modifier, controlState, badge, isSelected: isSelected),
activeIcon: _buildBadgeIconBottomNavigationBarItem(context, icon, modifier, controlState, badge, isSelected: isSelected),
);
}