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,
|
buttonBackgroundColor: buttonColor,
|
||||||
color: theme.colorScheme.background,
|
color: theme.colorScheme.background,
|
||||||
height: 50,
|
height: 50,
|
||||||
items: [
|
animationDuration: const Duration(milliseconds: 350),
|
||||||
...navbarTileList.map(
|
items: navbarTileList.map(
|
||||||
(e) {
|
(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(
|
return MouseRegion(
|
||||||
cursor: SystemMouseCursors.click,
|
cursor: SystemMouseCursors.click,
|
||||||
child: Badge(
|
child: Badge(
|
||||||
@ -67,13 +70,13 @@ class SpotubeNavigationBar extends HookConsumerWidget {
|
|||||||
label: Text(downloadCount.toString()),
|
label: Text(downloadCount.toString()),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
e.icon,
|
e.icon,
|
||||||
color: theme.colorScheme.primary,
|
color: Theme.of(context).colorScheme.primary,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
),
|
).toList(),
|
||||||
],
|
|
||||||
index: insideSelectedIndex.value,
|
index: insideSelectedIndex.value,
|
||||||
onTap: (i) {
|
onTap: (i) {
|
||||||
insideSelectedIndex.value = i;
|
insideSelectedIndex.value = i;
|
||||||
|
Loading…
Reference in New Issue
Block a user