mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
leading/center not working on PageWindowTitle on Android fixed
artist-to-clickable-artists now responsive useBreakpoint logic updated
This commit is contained in:
parent
c64f329c42
commit
c4c9fd7ac2
@ -20,8 +20,7 @@ class PlayerTrackDetails extends HookConsumerWidget {
|
||||
children: [
|
||||
if (albumArt != null)
|
||||
Padding(
|
||||
padding: EdgeInsets.all(
|
||||
breakpoint.isLessThanOrEqualTo(Breakpoints.md) ? 5.0 : 0),
|
||||
padding: const EdgeInsets.all(5.0),
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: albumArt!,
|
||||
maxHeightDiskCache: 50,
|
||||
@ -36,8 +35,7 @@ class PlayerTrackDetails extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (breakpoint.isLessThanOrEqualTo(Breakpoints.md)) ...[
|
||||
const SizedBox(width: 10),
|
||||
if (breakpoint.isLessThanOrEqualTo(Breakpoints.md))
|
||||
Flexible(
|
||||
child: Text(
|
||||
playback.currentTrack?.name ?? "Not playing",
|
||||
@ -48,7 +46,7 @@ class PlayerTrackDetails extends HookConsumerWidget {
|
||||
?.copyWith(fontWeight: FontWeight.bold, color: color),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
// title of the currently playing track
|
||||
if (breakpoint.isMoreThan(Breakpoints.md))
|
||||
Flexible(
|
||||
@ -65,7 +63,6 @@ class PlayerTrackDetails extends HookConsumerWidget {
|
||||
),
|
||||
artistsToClickableArtists(
|
||||
playback.currentTrack?.artists ?? [],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
)
|
||||
],
|
||||
),
|
||||
|
@ -65,7 +65,6 @@ class PlayerView extends HookConsumerWidget {
|
||||
),
|
||||
artistsToClickableArtists(
|
||||
currentTrack?.artists ?? [],
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
textStyle: Theme.of(context).textTheme.headline6!.copyWith(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: paletteColor.bodyTextColor,
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@ -80,6 +82,7 @@ class Settings extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
if (!Platform.isAndroid && !Platform.isIOS) ...[
|
||||
SettingsHotKeyTile(
|
||||
title: "Next track global shortcut",
|
||||
currentHotKey: preferences.nextTrackHotKey,
|
||||
@ -101,6 +104,7 @@ class Settings extends HookConsumerWidget {
|
||||
preferences.setPlayPauseHotKey(value);
|
||||
},
|
||||
),
|
||||
],
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@ -170,8 +174,8 @@ class Settings extends HookConsumerWidget {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
children: const [
|
||||
Hyperlink(
|
||||
"💚 Sponsor/Donate 💚",
|
||||
|
@ -53,14 +53,14 @@ class PageWindowTitleBar extends StatelessWidget
|
||||
: super(key: key);
|
||||
@override
|
||||
Size get preferredSize => Size.fromHeight(
|
||||
!Platform.isIOS && !Platform.isAndroid ? appWindow.titleBarHeight : 0,
|
||||
!Platform.isIOS && !Platform.isAndroid ? appWindow.titleBarHeight : 35,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (Platform.isIOS || Platform.isAndroid) {
|
||||
return PreferredSize(
|
||||
preferredSize: const Size.fromHeight(70),
|
||||
preferredSize: const Size.fromHeight(300),
|
||||
child: Row(
|
||||
children: [
|
||||
if (leading != null) leading!,
|
||||
|
@ -1,18 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:spotify/spotify.dart';
|
||||
import 'package:spotube/components/Artist/ArtistProfile.dart';
|
||||
import 'package:spotube/components/Shared/LinkText.dart';
|
||||
import 'package:spotube/components/Shared/SpotubePageRoute.dart';
|
||||
|
||||
Widget artistsToClickableArtists(
|
||||
List<ArtistSimple> artists, {
|
||||
CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
|
||||
MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
|
||||
WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.center,
|
||||
WrapAlignment mainAxisAlignment = WrapAlignment.center,
|
||||
TextStyle textStyle = const TextStyle(),
|
||||
}) {
|
||||
return Row(
|
||||
return Wrap(
|
||||
crossAxisAlignment: crossAxisAlignment,
|
||||
mainAxisAlignment: mainAxisAlignment,
|
||||
alignment: mainAxisAlignment,
|
||||
children: artists
|
||||
.asMap()
|
||||
.entries
|
||||
|
@ -73,22 +73,22 @@ BreakpointUtils useBreakpoints() {
|
||||
final utils = BreakpointUtils(breakpoint.value);
|
||||
|
||||
useEffect(() {
|
||||
if (width >= 1920 && breakpoint.value != Breakpoints.xxl) {
|
||||
if (width > 1920 && breakpoint.value != Breakpoints.xxl) {
|
||||
breakpoint.value = Breakpoints.xxl;
|
||||
} else if (width >= 1366 &&
|
||||
width < 1920 &&
|
||||
} else if (width > 1366 &&
|
||||
width <= 1920 &&
|
||||
breakpoint.value != Breakpoints.xl) {
|
||||
breakpoint.value = Breakpoints.xl;
|
||||
} else if (width >= 768 &&
|
||||
width < 1366 &&
|
||||
} else if (width > 768 &&
|
||||
width <= 1366 &&
|
||||
breakpoint.value != Breakpoints.lg) {
|
||||
breakpoint.value = Breakpoints.lg;
|
||||
} else if (width >= 360 &&
|
||||
width < 768 &&
|
||||
} else if (width > 360 &&
|
||||
width <= 768 &&
|
||||
breakpoint.value != Breakpoints.md) {
|
||||
breakpoint.value = Breakpoints.md;
|
||||
} else if (width >= 250 &&
|
||||
width < 360 &&
|
||||
width <= 360 &&
|
||||
breakpoint.value != Breakpoints.sm) {
|
||||
breakpoint.value = Breakpoints.sm;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user