mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix: content going below bottom player or nav bar
This commit is contained in:
parent
a0b377104f
commit
1bdce9fe96
@ -63,11 +63,9 @@ class UserAlbums extends HookConsumerWidget {
|
||||
},
|
||||
child: SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
|
@ -84,6 +84,7 @@ class UserArtists extends HookConsumerWidget {
|
||||
onRefresh: () async {
|
||||
await artistQuery.refreshAll();
|
||||
},
|
||||
child: SafeArea(
|
||||
child: GridView.builder(
|
||||
itemCount: filteredArtists.length,
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
@ -96,7 +97,8 @@ class UserArtists extends HookConsumerWidget {
|
||||
padding: const EdgeInsets.all(10),
|
||||
itemBuilder: (context, index) {
|
||||
return HookBuilder(builder: (context) {
|
||||
if (index == artistQuery.pages.length - 1 && hasNextPage) {
|
||||
if (index == artistQuery.pages.length - 1 &&
|
||||
hasNextPage) {
|
||||
return Waypoint(
|
||||
controller: useScrollController(),
|
||||
isGrid: true,
|
||||
@ -111,6 +113,7 @@ class UserArtists extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,7 @@ class UserDownloads extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: SafeArea(
|
||||
child: ListView.builder(
|
||||
itemCount: downloader.inQueue.length,
|
||||
itemBuilder: (context, index) {
|
||||
@ -78,6 +79,7 @@ class UserDownloads extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -92,10 +92,9 @@ class UserPlaylists extends HookConsumerWidget {
|
||||
onRefresh: playlistsQuery.refresh,
|
||||
child: SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Material(
|
||||
type: MaterialType.transparency,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
children: [
|
||||
TextField(
|
||||
|
@ -260,8 +260,12 @@ class TracksTableView extends HookConsumerWidget {
|
||||
];
|
||||
|
||||
if (isSliver) {
|
||||
return SliverList(delegate: SliverChildListDelegate(children));
|
||||
return SliverSafeArea(
|
||||
sliver: SliverList(delegate: SliverChildListDelegate(children)),
|
||||
);
|
||||
}
|
||||
return ListView(children: children);
|
||||
return SafeArea(
|
||||
child: ListView(children: children),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ class ArtistPage extends HookConsumerWidget {
|
||||
return SingleChildScrollView(
|
||||
controller: parentScrollController,
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
@ -116,7 +117,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
horizontal: 10, vertical: 5),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue,
|
||||
borderRadius: BorderRadius.circular(50)),
|
||||
borderRadius:
|
||||
BorderRadius.circular(50)),
|
||||
child: Text(
|
||||
data.type!.toUpperCase(),
|
||||
style: chipTextVariant?.copyWith(
|
||||
@ -163,7 +165,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
if (auth != null)
|
||||
HookBuilder(
|
||||
builder: (context) {
|
||||
final isFollowingQuery = useQueries.artist
|
||||
final isFollowingQuery = useQueries
|
||||
.artist
|
||||
.doIFollow(ref, artistId);
|
||||
|
||||
if (isFollowingQuery.isLoading ||
|
||||
@ -175,7 +178,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
|
||||
final queryBowl = QueryClient.of(context);
|
||||
final queryBowl =
|
||||
QueryClient.of(context);
|
||||
|
||||
return FilledButton(
|
||||
onPressed: () async {
|
||||
@ -217,8 +221,9 @@ class ArtistPage extends HookConsumerWidget {
|
||||
: Colors.white,
|
||||
),
|
||||
style: IconButton.styleFrom(
|
||||
backgroundColor:
|
||||
isBlackListed ? Colors.red[400] : null,
|
||||
backgroundColor: isBlackListed
|
||||
? Colors.red[400]
|
||||
: null,
|
||||
),
|
||||
onPressed: () async {
|
||||
if (isBlackListed) {
|
||||
@ -248,7 +253,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
text: data.externalUrls?.spotify),
|
||||
);
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(
|
||||
const SnackBar(
|
||||
width: 300,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
@ -280,7 +286,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
topTracksQuery.data ?? <Track>[],
|
||||
);
|
||||
|
||||
if (topTracksQuery.isLoading || !topTracksQuery.hasData) {
|
||||
if (topTracksQuery.isLoading ||
|
||||
!topTracksQuery.hasData) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (topTracksQuery.hasError) {
|
||||
return Center(
|
||||
@ -295,8 +302,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
currentTrack ??= tracks.first;
|
||||
if (!isPlaylistPlaying) {
|
||||
playlistNotifier.loadAndPlay(tracks,
|
||||
active: tracks
|
||||
.indexWhere((s) => s.id == currentTrack?.id));
|
||||
active: tracks.indexWhere(
|
||||
(s) => s.id == currentTrack?.id));
|
||||
} else if (isPlaylistPlaying &&
|
||||
currentTrack.id != null &&
|
||||
currentTrack.id != playlist?.activeTrack.id) {
|
||||
@ -309,7 +316,8 @@ class ArtistPage extends HookConsumerWidget {
|
||||
children: [
|
||||
Text(
|
||||
"Top Tracks",
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
style:
|
||||
Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
if (!isPlaylistPlaying)
|
||||
IconButton(
|
||||
@ -339,9 +347,11 @@ class ArtistPage extends HookConsumerWidget {
|
||||
color: Colors.white,
|
||||
),
|
||||
style: IconButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).primaryColor,
|
||||
backgroundColor:
|
||||
Theme.of(context).primaryColor,
|
||||
),
|
||||
onPressed: () => playPlaylist(topTracks.toList()),
|
||||
onPressed: () =>
|
||||
playPlaylist(topTracks.toList()),
|
||||
)
|
||||
],
|
||||
),
|
||||
@ -379,12 +389,14 @@ class ArtistPage extends HookConsumerWidget {
|
||||
const SizedBox(height: 10),
|
||||
HookBuilder(
|
||||
builder: (context) {
|
||||
final relatedArtists = useQueries.artist.relatedArtistsOf(
|
||||
final relatedArtists =
|
||||
useQueries.artist.relatedArtistsOf(
|
||||
ref,
|
||||
artistId,
|
||||
);
|
||||
|
||||
if (relatedArtists.isLoading || !relatedArtists.hasData) {
|
||||
if (relatedArtists.isLoading ||
|
||||
!relatedArtists.hasData) {
|
||||
return const CircularProgressIndicator();
|
||||
} else if (relatedArtists.hasError) {
|
||||
return Center(
|
||||
@ -405,6 +417,7 @@ class ArtistPage extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -77,7 +77,7 @@ class GenrePage extends HookConsumerWidget {
|
||||
if (searchText.value.isEmpty && index == categories.length - 1) {
|
||||
return const ShimmerCategories();
|
||||
}
|
||||
return CategoryCard(category);
|
||||
return SafeArea(child: CategoryCard(category));
|
||||
},
|
||||
),
|
||||
),
|
||||
|
@ -75,6 +75,7 @@ class PersonalizedItemCard extends HookWidget {
|
||||
child: Waypoint(
|
||||
controller: scrollController,
|
||||
onTouchEdge: hasNextPage ? onFetchMore : null,
|
||||
child: SafeArea(
|
||||
child: ListView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
@ -95,6 +96,7 @@ class PersonalizedItemCard extends HookWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ class LibraryPage extends HookConsumerWidget {
|
||||
const LibraryPage({Key? key}) : super(key: key);
|
||||
@override
|
||||
Widget build(BuildContext context, ref) {
|
||||
return const SafeArea(
|
||||
bottom: false,
|
||||
child: DefaultTabController(
|
||||
return const DefaultTabController(
|
||||
length: 5,
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: Scaffold(
|
||||
appBar: PageWindowTitleBar(
|
||||
centerTitle: true,
|
||||
|
@ -65,7 +65,6 @@ class SearchPage extends HookConsumerWidget {
|
||||
bottom: false,
|
||||
child: Scaffold(
|
||||
appBar: kIsDesktop && !kIsMacOS ? const PageWindowTitleBar() : null,
|
||||
extendBody: true,
|
||||
body: !authenticationNotifier.isLoggedIn
|
||||
? const AnonymousFallback()
|
||||
: Column(
|
||||
@ -128,14 +127,16 @@ class SearchPage extends HookConsumerWidget {
|
||||
vertical: 8,
|
||||
horizontal: 20,
|
||||
),
|
||||
child: SafeArea(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if (tracks.isNotEmpty)
|
||||
Text(
|
||||
"Songs",
|
||||
style:
|
||||
Theme.of(context).textTheme.titleLarge!,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleLarge!,
|
||||
),
|
||||
if (searchTrack.isLoadingPage)
|
||||
const CircularProgressIndicator()
|
||||
@ -197,13 +198,14 @@ class SearchPage extends HookConsumerWidget {
|
||||
if (playlists.isNotEmpty)
|
||||
Text(
|
||||
"Playlists",
|
||||
style:
|
||||
Theme.of(context).textTheme.titleLarge!,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleLarge!,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
ScrollConfiguration(
|
||||
behavior:
|
||||
ScrollConfiguration.of(context).copyWith(
|
||||
behavior: ScrollConfiguration.of(context)
|
||||
.copyWith(
|
||||
dragDevices: {
|
||||
PointerDeviceKind.touch,
|
||||
PointerDeviceKind.mouse,
|
||||
@ -227,7 +229,9 @@ class SearchPage extends HookConsumerWidget {
|
||||
children: [
|
||||
...playlists.mapIndexed(
|
||||
(i, playlist) {
|
||||
if (i == playlists.length - 1 &&
|
||||
if (i ==
|
||||
playlists.length -
|
||||
1 &&
|
||||
searchPlaylist
|
||||
.hasNextPage) {
|
||||
return const ShimmerPlaybuttonCard(
|
||||
@ -254,13 +258,14 @@ class SearchPage extends HookConsumerWidget {
|
||||
if (artists.isNotEmpty)
|
||||
Text(
|
||||
"Artists",
|
||||
style:
|
||||
Theme.of(context).textTheme.titleLarge!,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleLarge!,
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
ScrollConfiguration(
|
||||
behavior:
|
||||
ScrollConfiguration.of(context).copyWith(
|
||||
behavior: ScrollConfiguration.of(context)
|
||||
.copyWith(
|
||||
dragDevices: {
|
||||
PointerDeviceKind.touch,
|
||||
PointerDeviceKind.mouse,
|
||||
@ -281,7 +286,8 @@ class SearchPage extends HookConsumerWidget {
|
||||
...artists.mapIndexed(
|
||||
(i, artist) {
|
||||
if (i == artists.length - 1 &&
|
||||
searchArtist.hasNextPage) {
|
||||
searchArtist
|
||||
.hasNextPage) {
|
||||
return const ShimmerPlaybuttonCard(
|
||||
count: 1);
|
||||
}
|
||||
@ -317,8 +323,8 @@ class SearchPage extends HookConsumerWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
ScrollConfiguration(
|
||||
behavior:
|
||||
ScrollConfiguration.of(context).copyWith(
|
||||
behavior: ScrollConfiguration.of(context)
|
||||
.copyWith(
|
||||
dragDevices: {
|
||||
PointerDeviceKind.touch,
|
||||
PointerDeviceKind.mouse,
|
||||
@ -359,13 +365,15 @@ class SearchPage extends HookConsumerWidget {
|
||||
const CircularProgressIndicator(),
|
||||
if (searchAlbum.hasPageError)
|
||||
Text(
|
||||
searchAlbum.errors.lastOrNull?.toString() ??
|
||||
searchAlbum.errors.lastOrNull
|
||||
?.toString() ??
|
||||
"",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
|
@ -17,9 +17,9 @@ class AboutSpotube extends HookConsumerWidget {
|
||||
final packageInfo = usePackageInfo();
|
||||
|
||||
return Scaffold(
|
||||
appBar: PageWindowTitleBar(
|
||||
leading: const BackButton(),
|
||||
title: const Text("About Spotube"),
|
||||
appBar: const PageWindowTitleBar(
|
||||
leading: BackButton(),
|
||||
title: Text("About Spotube"),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Padding(
|
||||
|
Loading…
Reference in New Issue
Block a user