Skip to content

Commit

Permalink
[Parent][RC-3.2.3] Fix tab icon color (#971)
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMarshall authored Sep 3, 2020
1 parent d3151a8 commit d4a3993
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class DashboardState extends State<DashboardScreen> {
dark: 'assets/svg/bottom-nav/courses-dark.svg',
),
activeIcon: _navBarIcon(
active: true,
light: 'assets/svg/bottom-nav/courses-light-selected.svg',
dark: 'assets/svg/bottom-nav/courses-dark-selected.svg',
),
Expand All @@ -384,6 +385,7 @@ class DashboardState extends State<DashboardScreen> {
dark: 'assets/svg/bottom-nav/calendar-dark.svg',
),
activeIcon: _navBarIcon(
active: true,
light: 'assets/svg/bottom-nav/calendar-light-selected.svg',
dark: 'assets/svg/bottom-nav/calendar-dark-selected.svg',
),
Expand All @@ -404,6 +406,7 @@ class DashboardState extends State<DashboardScreen> {
),
activeIcon: WidgetBadge(
_navBarIcon(
active: true,
light: 'assets/svg/bottom-nav/alerts-light-selected.svg',
dark: 'assets/svg/bottom-nav/alerts-dark-selected.svg',
),
Expand All @@ -419,10 +422,11 @@ class DashboardState extends State<DashboardScreen> {
];
}

Widget _navBarIcon({@required String light, @required String dark}) {
Widget _navBarIcon({@required String light, @required String dark, bool active: false}) {
bool darkMode = ParentTheme.of(context).isDarkMode;
return SvgPicture.asset(
darkMode ? dark : light,
color: active? ParentTheme.of(context).studentColor : null,
width: 24,
height: 24,
);
Expand Down

0 comments on commit d4a3993

Please sign in to comment.