Skip to content

Commit

Permalink
fix: bottom navbar first item icon color not changing on primary colo…
Browse files Browse the repository at this point in the history
…r change
  • Loading branch information
KRTirtho committed Mar 24, 2023
1 parent 7a0fd64 commit 6eb4244
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/components/root/spotube_navigation_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,23 +57,26 @@ class SpotubeNavigationBar extends HookConsumerWidget {
buttonBackgroundColor: buttonColor,
color: theme.colorScheme.background,
height: 50,
items: [
...navbarTileList.map(
(e) {
animationDuration: const Duration(milliseconds: 350),
items: navbarTileList.map(
(e) {
/// Using this [Builder] as an workaround for the first item's
/// icon color not updating unless navigating to another page
return Builder(builder: (context) {
return MouseRegion(
cursor: SystemMouseCursors.click,
child: Badge(
isLabelVisible: e.title == "Library" && downloadCount > 0,
label: Text(downloadCount.toString()),
child: Icon(
e.icon,
color: theme.colorScheme.primary,
color: Theme.of(context).colorScheme.primary,
),
),
);
},
),
],
});
},
).toList(),
index: insideSelectedIndex.value,
onTap: (i) {
insideSelectedIndex.value = i;
Expand Down

0 comments on commit 6eb4244

Please sign in to comment.