From 0f6e440612dbae24ff9ad10b54ea0d8ee797d8c8 Mon Sep 17 00:00:00 2001 From: Chaphasilor Date: Mon, 11 Nov 2024 11:32:07 +0100 Subject: [PATCH] ran `dart format .` --- .../add_to_playlist_button.dart | 2 +- .../AlbumScreen/track_list_tile.dart | 55 +++++++++---------- .../PlayerScreen/feature_chips.dart | 4 +- lib/main.dart | 3 +- lib/services/downloads_service.dart | 4 +- lib/services/ui_overlay_setter_observer.dart | 2 +- lib/setup_logging.dart | 1 - 7 files changed, 31 insertions(+), 40 deletions(-) diff --git a/lib/components/AddToPlaylistScreen/add_to_playlist_button.dart b/lib/components/AddToPlaylistScreen/add_to_playlist_button.dart index c5f5adba..d6ce13c6 100644 --- a/lib/components/AddToPlaylistScreen/add_to_playlist_button.dart +++ b/lib/components/AddToPlaylistScreen/add_to_playlist_button.dart @@ -38,7 +38,7 @@ class AddToPlaylistButton extends ConsumerStatefulWidget { class _AddToPlaylistButtonState extends ConsumerState { final _queueService = GetIt.instance(); - + @override Widget build(BuildContext context) { if (widget.item == null) { diff --git a/lib/components/AlbumScreen/track_list_tile.dart b/lib/components/AlbumScreen/track_list_tile.dart index e2148e79..d090e321 100644 --- a/lib/components/AlbumScreen/track_list_tile.dart +++ b/lib/components/AlbumScreen/track_list_tile.dart @@ -478,41 +478,37 @@ class TrackListItemState extends ConsumerState // brightness: Theme.of(context).brightness, colorScheme: imageTheme.copyWith( surfaceContainer: ref - .watch(colorThemeProvider) - .primary - .withOpacity( - Theme.of(context).brightness == - Brightness.dark - ? 0.35 - : 0.3) - ), + .watch(colorThemeProvider) + .primary + .withOpacity( + Theme.of(context).brightness == + Brightness.dark + ? 0.35 + : 0.3)), textTheme: Theme.of(context).textTheme.copyWith( bodyLarge: Theme.of(context) .textTheme .bodyLarge ?.copyWith( color: Color.alphaBlend( - (ref - .watch( - colorThemeProvider) - .secondary - .withOpacity(Theme.of( - context) - .brightness == - Brightness - .light - ? 0.5 + (ref + .watch(colorThemeProvider) + .secondary + .withOpacity(Theme.of( + context) + .brightness == + Brightness.light + ? 0.5 : 0.1)), - Theme.of(context) - .textTheme - .bodyLarge - ?.color ?? - (Theme.of(context) - .brightness == - Brightness.light - ? Colors.black - : Colors.white)) - ), + Theme.of(context) + .textTheme + .bodyLarge + ?.color ?? + (Theme.of(context) + .brightness == + Brightness.light + ? Colors.black + : Colors.white))), ), iconTheme: Theme.of(context).iconTheme.copyWith( color: imageTheme.primary, @@ -619,9 +615,8 @@ class TrackListItemTile extends StatelessWidget { @override Widget build(BuildContext context) { - final highlightTrack = isCurrentTrack && highlightCurrentTrack; - + final bool secondRowNeeded = showArtists || showAlbum || showPlayCount; final durationLabelFullHours = diff --git a/lib/components/PlayerScreen/feature_chips.dart b/lib/components/PlayerScreen/feature_chips.dart index 3347fa7d..b0690c9a 100644 --- a/lib/components/PlayerScreen/feature_chips.dart +++ b/lib/components/PlayerScreen/feature_chips.dart @@ -66,9 +66,8 @@ class FeatureState { ), ); } - - for (var feature in configuration.features) { + for (var feature in configuration.features) { // TODO this will likely be extremely outdated if offline, hide? if (feature == FinampFeatureChipType.playCount && currentTrack?.baseItem?.userData?.playCount != null) { @@ -182,7 +181,6 @@ class FeatureState { ); } } - } return features; } diff --git a/lib/main.dart b/lib/main.dart index 85ff783f..4b79fd28 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -125,7 +125,8 @@ void main() async { Future _setupEdgeToEdgeOverlayStyle() async { if (Platform.isAndroid) { await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge); - SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(systemNavigationBarColor: Colors.transparent)); + SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( + systemNavigationBarColor: Colors.transparent)); final binding = WidgetsFlutterBinding.ensureInitialized(); binding.addObserver(UIOverlaySetterObserver()); } diff --git a/lib/services/downloads_service.dart b/lib/services/downloads_service.dart index 876e1772..1cd70b10 100644 --- a/lib/services/downloads_service.dart +++ b/lib/services/downloads_service.dart @@ -1227,7 +1227,6 @@ class DownloadsService { } Future addDefaultPlaylistInfoDownload() async { - String? downloadLocation = FinampSettingsHelper.finampSettings.defaultDownloadLocation; if (!FinampSettingsHelper.finampSettings.downloadLocationsMap @@ -1240,8 +1239,7 @@ class DownloadsService { await addDownload( stub: DownloadStub.fromFinampCollection( FinampCollection(type: FinampCollectionType.allPlaylistsMetadata)), - transcodeProfile: - DownloadProfile( + transcodeProfile: DownloadProfile( transcodeCodec: FinampTranscodingCodec.original, downloadLocationId: downloadLocation, ), diff --git a/lib/services/ui_overlay_setter_observer.dart b/lib/services/ui_overlay_setter_observer.dart index beed2372..5d8952ce 100644 --- a/lib/services/ui_overlay_setter_observer.dart +++ b/lib/services/ui_overlay_setter_observer.dart @@ -17,4 +17,4 @@ class UIOverlaySetterObserver extends WidgetsBindingObserver { break; } } -} \ No newline at end of file +} diff --git a/lib/setup_logging.dart b/lib/setup_logging.dart index b2b4c5cc..386d453a 100644 --- a/lib/setup_logging.dart +++ b/lib/setup_logging.dart @@ -61,5 +61,4 @@ Future setupLogging() async { startupLogger .info("Web browser ${webInfo.userAgent} on ${webInfo.platform}"); } - }