mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: bottom navbar first item icon color not changing on primary color change
This commit is contained in:
parent
7a0fd64cf9
commit
6eb4244f32
@ -57,9 +57,12 @@ 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(
|
||||
@ -67,13 +70,13 @@ class SpotubeNavigationBar extends HookConsumerWidget {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user