getBackgroundColor function
Color
getBackgroundColor(
- BuildContext context,
- List<
PersistentBottomNavBarItem> ? items, - Color? color,
- 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;
}
}