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