feat: make other views correctly scrollable

This commit is contained in:
Matyáš Caras 2024-06-21 13:08:40 +02:00
parent e68c775fca
commit 9bf73c1bc5
Signed by: hernik
GPG key ID: 2A3175F98820C5C6
2 changed files with 39 additions and 35 deletions

View file

@ -36,11 +36,12 @@ class _AlbumViewState extends State<AlbumView> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: SizedBox(
body: Align(
alignment: Alignment.topCenter,
child: SizedBox(
width: 100.w,
height: 100.h,
height: 90.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
HeroBanner(
cacheKey: widget.album.coverArtId,
@ -49,7 +50,7 @@ class _AlbumViewState extends State<AlbumView> {
description: widget.album.artistName,
),
SizedBox(
height: 65.h,
height: 46.h,
width: 95.w,
child: ListView.builder(
itemBuilder: (c, i) => InkWell(
@ -57,7 +58,8 @@ class _AlbumViewState extends State<AlbumView> {
playerKey.currentState?.update();
await AudioPlayerService().playNow(
queueNext: _songs.getRange(i, _songs.length).toList(),
queuePast: (i == 0) ? [] : _songs.getRange(0, i).toList(),
queuePast:
(i == 0) ? [] : _songs.getRange(0, i).toList(),
);
setState(() {});
@ -73,6 +75,7 @@ class _AlbumViewState extends State<AlbumView> {
],
),
),
),
);
}
}

View file

@ -51,7 +51,8 @@ class _ArtistViewState extends State<ArtistView> {
description: "This could be a cool description soon",
heroTag: widget.artist.name,
),
Center(
Align(
alignment: Alignment.topCenter,
child: SizedBox(
height: 70.h,
width: 95.w,