Skip to content

Commit

Permalink
change selectedIcon to activeIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepighetti committed Dec 14, 2020
1 parent e1531f5 commit 0782ee5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/salomon_bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class SalomonBottomBar extends StatelessWidget {
_unselectedColor, _selectedColor, t),
size: 24,
),
child: items.indexOf(item) == currentIndex ? (item.selectedIcon ?? item.icon ?? SizedBox.shrink()) : (item.icon ?? SizedBox.shrink()),
child: items.indexOf(item) == currentIndex ? (item.activeIcon ?? item.icon ?? SizedBox.shrink()) : (item.icon ?? SizedBox.shrink()),
),
ClipRect(
child: SizedBox(
Expand Down Expand Up @@ -139,8 +139,8 @@ class SalomonBottomBarItem {
/// An icon to display.
final Widget icon;

/// An selected icon to display.
final Widget selectedIcon;
/// An icon to display when this tab bar is active.
final Widget activeIcon;

/// Text to display, ie `Home`
final Widget title;
Expand All @@ -156,7 +156,7 @@ class SalomonBottomBarItem {
@required this.title,
this.selectedColor,
this.unselectedColor,
this.selectedIcon,
this.activeIcon,
}) : assert(icon != null, "Every SalomonBottomBarItem requires an icon."),
assert(title != null, "Every SalomonBottomBarItem requires a title.");
}

0 comments on commit 0782ee5

Please sign in to comment.