Skip to content

Commit

Permalink
fix: sidebar task counter badge and bottom player play button progres…
Browse files Browse the repository at this point in the history
…s color
  • Loading branch information
Kingkor Roy Tirtho committed Apr 28, 2023
1 parent d7135db commit af278d8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
7 changes: 5 additions & 2 deletions lib/components/player/player_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
35 changes: 20 additions & 15 deletions lib/components/root/sidebar.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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,
);
},
Expand Down

0 comments on commit af278d8

Please sign in to comment.