mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 16:05:18 +00:00
chore: fix dart analyzer warnings
This commit is contained in:
parent
08fe364886
commit
c1db2da384
@ -75,7 +75,7 @@ class HomeTabAction extends Action<HomeTabIntent> {
|
|||||||
router.navigate(const SearchRoute());
|
router.navigate(const SearchRoute());
|
||||||
break;
|
break;
|
||||||
case HomeTabs.lyrics:
|
case HomeTabs.lyrics:
|
||||||
router.navigate(LyricsRoute());
|
router.navigate(const LyricsRoute());
|
||||||
break;
|
break;
|
||||||
case HomeTabs.userPlaylists:
|
case HomeTabs.userPlaylists:
|
||||||
router.navigate(const UserPlaylistsRoute());
|
router.navigate(const UserPlaylistsRoute());
|
||||||
|
@ -38,7 +38,7 @@ List<SideBarTiles> getSidebarTileList(AppLocalizations l10n) => [
|
|||||||
SideBarTiles(
|
SideBarTiles(
|
||||||
id: "lyrics",
|
id: "lyrics",
|
||||||
pathPrefix: "/lyrics",
|
pathPrefix: "/lyrics",
|
||||||
route: LyricsRoute(),
|
route: const LyricsRoute(),
|
||||||
icon: SpotubeIcons.music,
|
icon: SpotubeIcons.music,
|
||||||
title: l10n.lyrics,
|
title: l10n.lyrics,
|
||||||
),
|
),
|
||||||
|
@ -146,7 +146,7 @@ class AdaptivePopSheetList<T> extends StatelessWidget {
|
|||||||
return Tooltip(
|
return Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(tooltip),
|
child: Text(tooltip),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: variance,
|
variance: variance,
|
||||||
icon: icon ?? const Icon(SpotubeIcons.moreVertical),
|
icon: icon ?? const Icon(SpotubeIcons.moreVertical),
|
||||||
@ -170,7 +170,7 @@ class AdaptivePopSheetList<T> extends StatelessWidget {
|
|||||||
|
|
||||||
if (child != null) {
|
if (child != null) {
|
||||||
return Tooltip(
|
return Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(tooltip)),
|
tooltip: TooltipContainer(child: Text(tooltip)).call,
|
||||||
child: Button(
|
child: Button(
|
||||||
onPressed: () => showDropdownMenu(context, Offset.zero),
|
onPressed: () => showDropdownMenu(context, Offset.zero),
|
||||||
style: variance,
|
style: variance,
|
||||||
@ -180,7 +180,7 @@ class AdaptivePopSheetList<T> extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Tooltip(
|
return Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(tooltip)),
|
tooltip: TooltipContainer(child: Text(tooltip)).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: variance,
|
variance: variance,
|
||||||
icon: icon ?? const Icon(SpotubeIcons.moreVertical),
|
icon: icon ?? const Icon(SpotubeIcons.moreVertical),
|
||||||
|
@ -40,7 +40,9 @@ class ExpandableSearchField extends StatelessWidget {
|
|||||||
focusNode: searchFocus,
|
focusNode: searchFocus,
|
||||||
controller: searchController,
|
controller: searchController,
|
||||||
placeholder: Text(context.l10n.search_tracks),
|
placeholder: Text(context.l10n.search_tracks),
|
||||||
leading: const Icon(SpotubeIcons.search),
|
features: const [
|
||||||
|
InputFeature.leading(Icon(SpotubeIcons.search))
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -130,8 +130,10 @@ class TextFormBuilderField extends StatelessWidget {
|
|||||||
filled: filled,
|
filled: filled,
|
||||||
placeholder: placeholder,
|
placeholder: placeholder,
|
||||||
border: border,
|
border: border,
|
||||||
leading: leading,
|
features: [
|
||||||
trailing: trailing,
|
if (leading != null) InputFeature.leading(leading!),
|
||||||
|
if (trailing != null) InputFeature.trailing(trailing!),
|
||||||
|
],
|
||||||
padding: padding,
|
padding: padding,
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
field.validate();
|
field.validate();
|
||||||
|
@ -33,7 +33,7 @@ class HeartButton extends HookConsumerWidget {
|
|||||||
if (auth.asData?.value == null) return const SizedBox.shrink();
|
if (auth.asData?.value == null) return const SizedBox.shrink();
|
||||||
|
|
||||||
return Tooltip(
|
return Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(tooltip ?? "")),
|
tooltip: TooltipContainer(child: Text(tooltip ?? "")).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: variance,
|
variance: variance,
|
||||||
size: size,
|
size: size,
|
||||||
|
@ -151,7 +151,7 @@ class PlaybuttonCard extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
title: Tooltip(
|
title: Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(title)),
|
tooltip: TooltipContainer(child: Text(title)).call,
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
@ -71,7 +71,7 @@ class PlaybuttonTile extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(context.l10n.add_to_queue)),
|
tooltip: TooltipContainer(child: Text(context.l10n.add_to_queue)).call,
|
||||||
child: IconButton.outline(
|
child: IconButton.outline(
|
||||||
icon: const Icon(SpotubeIcons.queueAdd),
|
icon: const Icon(SpotubeIcons.queueAdd),
|
||||||
onPressed: onAddToQueuePressed,
|
onPressed: onAddToQueuePressed,
|
||||||
@ -80,7 +80,7 @@ class PlaybuttonTile extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(context.l10n.play)),
|
tooltip: TooltipContainer(child: Text(context.l10n.play)).call,
|
||||||
child: IconButton.secondary(
|
child: IconButton.secondary(
|
||||||
icon: switch ((isLoading, isPlaying)) {
|
icon: switch ((isLoading, isPlaying)) {
|
||||||
(true, _) => const CircularProgressIndicator(
|
(true, _) => const CircularProgressIndicator(
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
import 'package:shadcn_flutter/shadcn_flutter.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:gap/gap.dart';
|
|
||||||
|
|
||||||
import 'package:skeletonizer/skeletonizer.dart';
|
import 'package:skeletonizer/skeletonizer.dart';
|
||||||
|
|
||||||
|
@ -67,10 +67,6 @@ class TrackPresentationModifiersSection extends HookConsumerWidget {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
leading: Icon(
|
|
||||||
SpotubeIcons.search,
|
|
||||||
color: context.theme.colorScheme.mutedForeground,
|
|
||||||
),
|
|
||||||
placeholder: Text(context.l10n.search_tracks),
|
placeholder: Text(context.l10n.search_tracks),
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
if (value.isEmpty) {
|
if (value.isEmpty) {
|
||||||
@ -79,30 +75,41 @@ class TrackPresentationModifiersSection extends HookConsumerWidget {
|
|||||||
notifier.filterTracks(value);
|
notifier.filterTracks(value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trailing: ListenableBuilder(
|
features: [
|
||||||
listenable: controller,
|
InputFeature.leading(
|
||||||
builder: (context, _) {
|
Icon(
|
||||||
return AnimatedCrossFade(
|
SpotubeIcons.search,
|
||||||
duration: const Duration(milliseconds: 300),
|
color: context.theme.colorScheme.mutedForeground,
|
||||||
crossFadeState: controller.text.isEmpty
|
),
|
||||||
? CrossFadeState.showFirst
|
),
|
||||||
: CrossFadeState.showSecond,
|
InputFeature.trailing(
|
||||||
firstChild:
|
ListenableBuilder(
|
||||||
const SizedBox.square(dimension: 20),
|
listenable: controller,
|
||||||
secondChild: AnimatedScale(
|
builder: (context, _) {
|
||||||
duration: const Duration(milliseconds: 300),
|
return AnimatedCrossFade(
|
||||||
scale: controller.text.isEmpty ? 0 : 1,
|
duration: const Duration(milliseconds: 300),
|
||||||
child: IconButton.ghost(
|
crossFadeState: controller.text.isEmpty
|
||||||
size: const ButtonSize(.6),
|
? CrossFadeState.showFirst
|
||||||
icon: const Icon(SpotubeIcons.close),
|
: CrossFadeState.showSecond,
|
||||||
onPressed: () {
|
firstChild:
|
||||||
controller.clear();
|
const SizedBox.square(dimension: 20),
|
||||||
notifier.clearFilter();
|
secondChild: AnimatedScale(
|
||||||
},
|
duration:
|
||||||
),
|
const Duration(milliseconds: 300),
|
||||||
),
|
scale: controller.text.isEmpty ? 0 : 1,
|
||||||
);
|
child: IconButton.ghost(
|
||||||
}),
|
size: const ButtonSize(.6),
|
||||||
|
icon: const Icon(SpotubeIcons.close),
|
||||||
|
onPressed: () {
|
||||||
|
controller.clear();
|
||||||
|
notifier.clearFilter();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -474,7 +474,7 @@ class TrackOptions extends HookConsumerWidget {
|
|||||||
leading: Assets.logos.songlinkTransparent.image(
|
leading: Assets.logos.songlinkTransparent.image(
|
||||||
width: 22,
|
width: 22,
|
||||||
height: 22,
|
height: 22,
|
||||||
color: colorScheme.foreground.withOpacity(0.5),
|
color: colorScheme.foreground.withValues(alpha: 0.5),
|
||||||
),
|
),
|
||||||
child: Text(context.l10n.song_link),
|
child: Text(context.l10n.song_link),
|
||||||
),
|
),
|
||||||
|
@ -10,7 +10,7 @@ class ColorConverter extends TypeConverter<Color, int> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
int toSql(Color value) {
|
int toSql(Color value) {
|
||||||
return value.value;
|
return value.toARGB32();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ class HomePageFeedSection extends HookConsumerWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, ref) {
|
Widget build(BuildContext context, ref) {
|
||||||
final homeFeed = ref.watch(homeViewProvider);
|
final homeFeed = ref.watch(homeViewProvider);
|
||||||
final nonShortSections = homeFeed.asData?.value?.sections
|
final nonShortSections = homeFeed.asData?.value.sections
|
||||||
.where((s) => s.typename == "HomeGenericSectionData")
|
.where((s) => s.typename == "HomeGenericSectionData")
|
||||||
.toList() ??
|
.toList() ??
|
||||||
[];
|
[];
|
||||||
|
@ -68,7 +68,7 @@ class MultiSelectField<T> extends HookWidget {
|
|||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
color: enabled
|
color: enabled
|
||||||
? theme.colorScheme.onSurface
|
? theme.colorScheme.onSurface
|
||||||
: theme.colorScheme.onSurface.withOpacity(0.1),
|
: theme.colorScheme.onSurface.withValues(alpha: 0.1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
mouseCursor: WidgetStateMouseCursor.textable,
|
mouseCursor: WidgetStateMouseCursor.textable,
|
||||||
|
@ -119,8 +119,10 @@ class SeedsMultiAutocomplete<T extends Object> extends HookWidget {
|
|||||||
focusNode: focusNode,
|
focusNode: focusNode,
|
||||||
onSubmitted: (_) => onFieldSubmitted(),
|
onSubmitted: (_) => onFieldSubmitted(),
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
leading: leading,
|
features: [
|
||||||
trailing: trailing,
|
if (leading != null) InputFeature.leading(leading!),
|
||||||
|
if (trailing != null) InputFeature.trailing(trailing!),
|
||||||
|
],
|
||||||
placeholder: placeholder,
|
placeholder: placeholder,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -89,7 +89,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.slide_to_seek),
|
child: Text(context.l10n.slide_to_seek),
|
||||||
),
|
).call,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: mediaQuery.xlAndUp ? 600 : 500,
|
width: mediaQuery.xlAndUp ? 600 : 500,
|
||||||
child: Slider(
|
child: Slider(
|
||||||
@ -147,7 +147,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
? context.l10n.unshuffle_playlist
|
? context.l10n.unshuffle_playlist
|
||||||
: context.l10n.shuffle_playlist,
|
: context.l10n.shuffle_playlist,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
SpotubeIcons.shuffle,
|
SpotubeIcons.shuffle,
|
||||||
@ -170,7 +170,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
}),
|
}),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.previous_track)),
|
child: Text(context.l10n.previous_track)).call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
enabled: !isFetchingActiveTrack,
|
enabled: !isFetchingActiveTrack,
|
||||||
icon: const Icon(SpotubeIcons.skipBack),
|
icon: const Icon(SpotubeIcons.skipBack),
|
||||||
@ -184,7 +184,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
? context.l10n.pause_playback
|
? context.l10n.pause_playback
|
||||||
: context.l10n.resume_playback,
|
: context.l10n.resume_playback,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton.primary(
|
child: IconButton.primary(
|
||||||
shape: ButtonShape.circle,
|
shape: ButtonShape.circle,
|
||||||
icon: isFetchingActiveTrack
|
icon: isFetchingActiveTrack
|
||||||
@ -206,7 +206,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip:
|
tooltip:
|
||||||
TooltipContainer(child: Text(context.l10n.next_track)),
|
TooltipContainer(child: Text(context.l10n.next_track)).call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
icon: const Icon(SpotubeIcons.skipForward),
|
icon: const Icon(SpotubeIcons.skipForward),
|
||||||
onPressed:
|
onPressed:
|
||||||
@ -226,7 +226,7 @@ class PlayerControls extends HookConsumerWidget {
|
|||||||
? context.l10n.repeat_playlist
|
? context.l10n.repeat_playlist
|
||||||
: "",
|
: "",
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
loopMode == PlaylistMode.single
|
loopMode == PlaylistMode.single
|
||||||
|
@ -161,7 +161,7 @@ class PlayerQueue extends HookConsumerWidget {
|
|||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.clear_all)),
|
child: Text(context.l10n.clear_all)).call,
|
||||||
child: IconButton.outline(
|
child: IconButton.outline(
|
||||||
icon: const Icon(SpotubeIcons.playlistRemove),
|
icon: const Icon(SpotubeIcons.playlistRemove),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
@ -76,7 +76,7 @@ class BottomPlayer extends HookConsumerWidget {
|
|||||||
extraActions: [
|
extraActions: [
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip:
|
tooltip:
|
||||||
TooltipContainer(child: Text(context.l10n.mini_player)),
|
TooltipContainer(child: Text(context.l10n.mini_player)).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: ButtonVariance.ghost,
|
variance: ButtonVariance.ghost,
|
||||||
icon: const Icon(SpotubeIcons.miniPlayer),
|
icon: const Icon(SpotubeIcons.miniPlayer),
|
||||||
|
@ -71,7 +71,7 @@ class Sidebar extends HookConsumerWidget {
|
|||||||
NavigationButton(
|
NavigationButton(
|
||||||
label: mediaQuery.lgAndUp ? Text(tile.title) : null,
|
label: mediaQuery.lgAndUp ? Text(tile.title) : null,
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(tile.title)),
|
tooltip: TooltipContainer(child: Text(tile.title)).call,
|
||||||
child: Icon(tile.icon),
|
child: Icon(tile.icon),
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@ -88,7 +88,7 @@ class Sidebar extends HookConsumerWidget {
|
|||||||
context.navigateTo(tile.route);
|
context.navigateTo(tile.route);
|
||||||
},
|
},
|
||||||
child: Tooltip(
|
child: Tooltip(
|
||||||
tooltip: TooltipContainer(child: Text(tile.title)),
|
tooltip: TooltipContainer(child: Text(tile.title)).call,
|
||||||
child: Icon(tile.icon),
|
child: Icon(tile.icon),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -21,7 +21,7 @@ class SpotubeColor extends Color {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() {
|
String toString() {
|
||||||
return "$name:$value";
|
return "$name:${toARGB32()}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class ArtistPageFooter extends ConsumerWidget {
|
|||||||
borderRadius: BorderRadius.circular(10),
|
borderRadius: BorderRadius.circular(10),
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
Colors.black.withOpacity(0.5),
|
Colors.black.withValues(alpha: 0.5),
|
||||||
BlendMode.darken,
|
BlendMode.darken,
|
||||||
),
|
),
|
||||||
image: UniversalImage.imageProvider(
|
image: UniversalImage.imageProvider(
|
||||||
|
@ -84,7 +84,7 @@ class ArtistPageHeader extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.add_artist_to_blacklist),
|
child: Text(context.l10n.add_artist_to_blacklist),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
SpotubeIcons.userRemove,
|
SpotubeIcons.userRemove,
|
||||||
|
@ -188,7 +188,7 @@ class ConnectControlPage extends HookConsumerWidget {
|
|||||||
? context.l10n.unshuffle_playlist
|
? context.l10n.unshuffle_playlist
|
||||||
: context.l10n.shuffle_playlist,
|
: context.l10n.shuffle_playlist,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: const Icon(SpotubeIcons.shuffle),
|
icon: const Icon(SpotubeIcons.shuffle),
|
||||||
variance: shuffled
|
variance: shuffled
|
||||||
@ -204,7 +204,7 @@ class ConnectControlPage extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.previous_track),
|
child: Text(context.l10n.previous_track),
|
||||||
),
|
).call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
icon: const Icon(SpotubeIcons.skipBack),
|
icon: const Icon(SpotubeIcons.skipBack),
|
||||||
onPressed: playlist.activeTrack == null
|
onPressed: playlist.activeTrack == null
|
||||||
@ -219,7 +219,7 @@ class ConnectControlPage extends HookConsumerWidget {
|
|||||||
? context.l10n.pause_playback
|
? context.l10n.pause_playback
|
||||||
: context.l10n.resume_playback,
|
: context.l10n.resume_playback,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton.primary(
|
child: IconButton.primary(
|
||||||
shape: ButtonShape.circle,
|
shape: ButtonShape.circle,
|
||||||
icon: playlist.activeTrack == null
|
icon: playlist.activeTrack == null
|
||||||
@ -247,7 +247,7 @@ class ConnectControlPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.next_track)),
|
child: Text(context.l10n.next_track)).call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
icon: const Icon(SpotubeIcons.skipForward),
|
icon: const Icon(SpotubeIcons.skipForward),
|
||||||
onPressed: playlist.activeTrack == null
|
onPressed: playlist.activeTrack == null
|
||||||
@ -264,7 +264,7 @@ class ConnectControlPage extends HookConsumerWidget {
|
|||||||
? context.l10n.repeat_playlist
|
? context.l10n.repeat_playlist
|
||||||
: context.l10n.no_loop,
|
: context.l10n.no_loop,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
loopMode == PlaylistMode.single
|
loopMode == PlaylistMode.single
|
||||||
|
@ -119,15 +119,19 @@ class LastFMLoginPage extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
obscureText: !passwordVisible.value,
|
obscureText: !passwordVisible.value,
|
||||||
placeholder: Text(context.l10n.password),
|
placeholder: Text(context.l10n.password),
|
||||||
trailing: IconButton.ghost(
|
features: [
|
||||||
icon: Icon(
|
InputFeature.trailing(
|
||||||
passwordVisible.value
|
IconButton.ghost(
|
||||||
? SpotubeIcons.eye
|
icon: Icon(
|
||||||
: SpotubeIcons.noEye,
|
passwordVisible.value
|
||||||
|
? SpotubeIcons.eye
|
||||||
|
: SpotubeIcons.noEye,
|
||||||
|
),
|
||||||
|
onPressed: () => passwordVisible.value =
|
||||||
|
!passwordVisible.value,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onPressed: () => passwordVisible.value =
|
],
|
||||||
!passwordVisible.value,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -75,7 +75,9 @@ class UserAlbumsPage extends HookConsumerWidget {
|
|||||||
height: 48,
|
height: 48,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
onChanged: (value) => searchText.value = value,
|
onChanged: (value) => searchText.value = value,
|
||||||
leading: const Icon(SpotubeIcons.filter),
|
features: const [
|
||||||
|
InputFeature.leading(Icon(SpotubeIcons.filter))
|
||||||
|
],
|
||||||
placeholder: Text(context.l10n.filter_artist),
|
placeholder: Text(context.l10n.filter_artist),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -80,7 +80,9 @@ class UserArtistsPage extends HookConsumerWidget {
|
|||||||
height: 48,
|
height: 48,
|
||||||
child: TextField(
|
child: TextField(
|
||||||
onChanged: (value) => searchText.value = value,
|
onChanged: (value) => searchText.value = value,
|
||||||
leading: const Icon(SpotubeIcons.filter),
|
features: const [
|
||||||
|
InputFeature.leading(Icon(SpotubeIcons.filter)),
|
||||||
|
],
|
||||||
placeholder: Text(context.l10n.filter_artist),
|
placeholder: Text(context.l10n.filter_artist),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -99,7 +99,9 @@ class UserPlaylistsPage extends HookConsumerWidget {
|
|||||||
child: TextField(
|
child: TextField(
|
||||||
onChanged: (value) => searchText.value = value,
|
onChanged: (value) => searchText.value = value,
|
||||||
placeholder: Text(context.l10n.filter_playlists),
|
placeholder: Text(context.l10n.filter_playlists),
|
||||||
leading: const Icon(SpotubeIcons.filter),
|
features: const [
|
||||||
|
InputFeature.leading(Icon(SpotubeIcons.filter)),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -101,7 +101,7 @@ class LyricsPage extends HookConsumerWidget {
|
|||||||
borderRadius: BorderRadius.zero,
|
borderRadius: BorderRadius.zero,
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
child: ColoredBox(
|
child: ColoredBox(
|
||||||
color: palette.color.withOpacity(.7),
|
color: palette.color.withValues(alpha: .7),
|
||||||
child: SafeArea(
|
child: SafeArea(
|
||||||
child: IndexedStack(
|
child: IndexedStack(
|
||||||
index: selectedIndex.value,
|
index: selectedIndex.value,
|
||||||
|
@ -59,7 +59,7 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
areaActive.value = false;
|
areaActive.value = false;
|
||||||
},
|
},
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: theme.colorScheme.background.withOpacity(0.4),
|
backgroundColor: theme.colorScheme.background.withValues(alpha: 0.4),
|
||||||
headers: [
|
headers: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
@ -89,7 +89,8 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
const Spacer(),
|
const Spacer(),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip:
|
tooltip:
|
||||||
TooltipContainer(child: Text(context.l10n.lyrics)),
|
TooltipContainer(child: Text(context.l10n.lyrics))
|
||||||
|
.call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: showLyrics.value
|
variance: showLyrics.value
|
||||||
? ButtonVariance.secondary
|
? ButtonVariance.secondary
|
||||||
@ -115,7 +116,7 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.show_hide_ui_on_hover),
|
child: Text(context.l10n.show_hide_ui_on_hover),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: hoverMode.value
|
variance: hoverMode.value
|
||||||
? ButtonVariance.secondary
|
? ButtonVariance.secondary
|
||||||
@ -136,7 +137,7 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
return Tooltip(
|
return Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.always_on_top),
|
child: Text(context.l10n.always_on_top),
|
||||||
),
|
).call,
|
||||||
child: IconButton(
|
child: IconButton(
|
||||||
variance: snapshot.data == true
|
variance: snapshot.data == true
|
||||||
? ButtonVariance.secondary
|
? ButtonVariance.secondary
|
||||||
@ -199,7 +200,7 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.queue),
|
child: Text(context.l10n.queue),
|
||||||
),
|
).call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
icon: const Icon(SpotubeIcons.queue),
|
icon: const Icon(SpotubeIcons.queue),
|
||||||
onPressed: playlistQueue.activeTrack != null
|
onPressed: playlistQueue.activeTrack != null
|
||||||
@ -245,7 +246,8 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
const Flexible(child: PlayerControls(compact: true)),
|
const Flexible(child: PlayerControls(compact: true)),
|
||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.exit_mini_player)),
|
child: Text(context.l10n.exit_mini_player))
|
||||||
|
.call,
|
||||||
child: IconButton.ghost(
|
child: IconButton.ghost(
|
||||||
icon: const Icon(SpotubeIcons.maximize),
|
icon: const Icon(SpotubeIcons.maximize),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
@ -268,7 +270,7 @@ class MiniLyricsPage extends HookConsumerWidget {
|
|||||||
const Duration(milliseconds: 200));
|
const Duration(milliseconds: 200));
|
||||||
} finally {
|
} finally {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
context.navigateTo(LyricsRoute());
|
context.navigateTo(const LyricsRoute());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -200,7 +200,7 @@ class SearchPage extends HookConsumerWidget {
|
|||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
color: theme.colorScheme.foreground
|
color: theme.colorScheme.foreground
|
||||||
.withOpacity(0.7),
|
.withValues(alpha: 0.7),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
|
@ -49,7 +49,7 @@ class SettingsAccountSection extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.navigateTo(ProfileRoute());
|
context.navigateTo(const ProfileRoute());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
if (auth.asData?.value == null)
|
if (auth.asData?.value == null)
|
||||||
|
@ -77,7 +77,7 @@ class TrackPage extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
colorFilter: ColorFilter.mode(
|
colorFilter: ColorFilter.mode(
|
||||||
colorScheme.background.withOpacity(0.5),
|
colorScheme.background.withValues(alpha: 0.5),
|
||||||
BlendMode.srcOver,
|
BlendMode.srcOver,
|
||||||
),
|
),
|
||||||
alignment: Alignment.topCenter,
|
alignment: Alignment.topCenter,
|
||||||
@ -196,7 +196,7 @@ class TrackPage extends HookConsumerWidget {
|
|||||||
Tooltip(
|
Tooltip(
|
||||||
tooltip: TooltipContainer(
|
tooltip: TooltipContainer(
|
||||||
child: Text(context.l10n.play_next),
|
child: Text(context.l10n.play_next),
|
||||||
),
|
).call,
|
||||||
child: IconButton.outline(
|
child: IconButton.outline(
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
SpotubeIcons.lightning),
|
SpotubeIcons.lightning),
|
||||||
@ -214,7 +214,7 @@ class TrackPage extends HookConsumerWidget {
|
|||||||
? context.l10n.pause_playback
|
? context.l10n.pause_playback
|
||||||
: context.l10n.play,
|
: context.l10n.play,
|
||||||
),
|
),
|
||||||
),
|
).call,
|
||||||
child: IconButton.primary(
|
child: IconButton.primary(
|
||||||
shape: ButtonShape.circle,
|
shape: ButtonShape.circle,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
|
@ -63,7 +63,9 @@ class AudioPlayerStreamListeners {
|
|||||||
final currentSegments = await ref.read(segmentProvider.future);
|
final currentSegments = await ref.read(segmentProvider.future);
|
||||||
|
|
||||||
if (currentSegments?.segments.isNotEmpty != true ||
|
if (currentSegments?.segments.isNotEmpty != true ||
|
||||||
position < const Duration(seconds: 3)) return;
|
position < const Duration(seconds: 3)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (final segment in currentSegments!.segments) {
|
for (final segment in currentSegments!.segments) {
|
||||||
final seconds = position.inSeconds;
|
final seconds = position.inSeconds;
|
||||||
|
@ -61,7 +61,7 @@ class AuthenticationNotifier extends AsyncNotifier<AuthenticationTableData?> {
|
|||||||
|
|
||||||
Timer? refreshTimer;
|
Timer? refreshTimer;
|
||||||
|
|
||||||
ref.listenSelf((prevData, newData) async {
|
listenSelf((prevData, newData) async {
|
||||||
if (newData.asData?.value == null) return;
|
if (newData.asData?.value == null) return;
|
||||||
|
|
||||||
if (newData.asData!.value!.isExpired) {
|
if (newData.asData!.value!.isExpired) {
|
||||||
|
@ -46,7 +46,9 @@ class DownloadManagerProvider extends ChangeNotifier {
|
|||||||
//? WebA audiotagging is not supported yet
|
//? WebA audiotagging is not supported yet
|
||||||
//? Although in future by converting weba to opus & then tagging it
|
//? Although in future by converting weba to opus & then tagging it
|
||||||
//? is possible using vorbis comments
|
//? is possible using vorbis comments
|
||||||
downloadCodec == SourceCodecs.weba) return;
|
downloadCodec == SourceCodecs.weba) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
final file = File(request.path);
|
final file = File(request.path);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user