fix: sidebar task counter badge and bottom player play button progress color

This commit is contained in:
Kingkor Roy Tirtho 2023-04-28 21:24:52 +06:00
parent d7135db5ad
commit af278d8fea
2 changed files with 25 additions and 17 deletions

View File

@ -206,10 +206,13 @@ class PlayerControls extends HookConsumerWidget {
IconButton(
tooltip: playing ? "Pause playback" : "Resume playback",
icon: playlist?.isLoading == true
? const SizedBox(
? SizedBox(
height: 20,
width: 20,
child: CircularProgressIndicator(),
child: CircularProgressIndicator(
color: accentColor?.titleTextColor ??
theme.colorScheme.onPrimary,
),
)
: Icon(
playing ? SpotubeIcons.pause : SpotubeIcons.play,

View File

@ -1,3 +1,4 @@
import 'package:collection/collection.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
@ -95,22 +96,26 @@ class Sidebar extends HookConsumerWidget {
SafeArea(
child: SidebarX(
controller: controller,
items: sidebarTileList.map(
(e) {
items: sidebarTileList.mapIndexed(
(index, e) {
return SidebarXItem(
// iconWidget: Badge(
// backgroundColor: theme.colorScheme.primary,
// isLabelVisible: e.title == "Library" && downloadCount > 0,
// label: Text(
// downloadCount.toString(),
// style: const TextStyle(
// color: Colors.white,
// fontSize: 10,
// ),
// ),
// child: Icon(e.icon),
// ),
icon: e.icon,
iconWidget: Badge(
backgroundColor: theme.colorScheme.primary,
isLabelVisible: e.title == "Library" && downloadCount > 0,
label: Text(
downloadCount.toString(),
style: const TextStyle(
color: Colors.white,
fontSize: 10,
),
),
child: Icon(
e.icon,
color: selectedIndex == index
? theme.colorScheme.primary
: null,
),
),
label: e.title,
);
},