getBackgroundColor function

Color getBackgroundColor(
  1. BuildContext context,
  2. List<PersistentBottomNavBarItem>? items,
  3. Color? color,
  4. int? selectedIndex,
)

Implementation

Color getBackgroundColor(
    BuildContext context, List<PersistentBottomNavBarItem>? items, Color? color, int? selectedIndex) {
  if (color == null) {
    return Colors.white;
  } else if (!opaque(items!, selectedIndex) && isColorOpaque(context, color)) {
    return color.withOpacity(getTranslucencyAmount(items, selectedIndex));
  } else {
    return color;
  }
}