ShiftableNavBar method

Widget ShiftableNavBar()

Implementation

Widget ShiftableNavBar() {
  return Container(
    color: backgroundColor ?? Colors.transparent,
    child: Row(
      mainAxisAlignment: MainAxisAlignment.spaceAround,
      children: items.asMap().entries.map((entry) {
        int index = entry.key;
        DDSBottomNavItemConfig item = entry.value;
        bool isSelected = index == currentIndex;

        return Container(
          decoration: isSelected
              ? BoxDecoration(
                  border: Border(
                    bottom: BorderSide(
                      color: shiftableLineColor ?? Colors.amber[800]!,
                      width: 2.0,
                    ),
                  ),
                )
              : null,
          child: _buildNavItem(item, index),
        );
      }).toList(),
    ),
  );
}