From 908c903a24d91227a0b8352527003924000333d7 Mon Sep 17 00:00:00 2001 From: Moritz Weber Date: Mon, 3 Oct 2022 12:17:41 +0200 Subject: [PATCH] details on highlight widgets --- .../presentation/widgets/highlight_album.dart | 55 +++++++------------ .../widgets/highlight_artist.dart | 35 ++++-------- 2 files changed, 32 insertions(+), 58 deletions(-) diff --git a/src/lib/presentation/widgets/highlight_album.dart b/src/lib/presentation/widgets/highlight_album.dart index 6b921ba..bdb53a5 100644 --- a/src/lib/presentation/widgets/highlight_album.dart +++ b/src/lib/presentation/widgets/highlight_album.dart @@ -31,50 +31,37 @@ class HighlightAlbum extends StatelessWidget { builder: (context) => AlbumDetailsPage(album: album), ), ), - child: Container( + child: Card( clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: Theme.of(context).cardColor, - borderRadius: BorderRadius.circular(8.0), - boxShadow: const [ - BoxShadow( - color: Colors.black54, - blurRadius: 8, - offset: Offset(0, 1), - spreadRadius: -5, - ), - ], - ), - child: Material( - color: Colors.transparent, + margin: EdgeInsets.zero, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)), + child: Padding( + padding: const EdgeInsets.fromLTRB(12, 12, 0, 12), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: SizedBox( - width: 100.0, - child: AspectRatio( - aspectRatio: 1, - child: Container( - clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(2.0), - boxShadow: const [ - BoxShadow(color: Colors.black54, blurRadius: 4, offset: Offset(0, 0), spreadRadius: -1), - ], - ), - child: Image( - image: getAlbumImage(album.albumArtPath), - fit: BoxFit.cover, - ), + SizedBox( + width: 100.0, + child: AspectRatio( + aspectRatio: 1, + child: Container( + clipBehavior: Clip.antiAlias, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(2.0), + boxShadow: const [ + BoxShadow(color: Colors.black54, blurRadius: 4, offset: Offset(0, 0), spreadRadius: -1), + ], + ), + child: Image( + image: getAlbumImage(album.albumArtPath), + fit: BoxFit.cover, ), ), ), ), Expanded( child: Padding( - padding: const EdgeInsets.only(left: 8.0, top: 8.0, bottom: 8.0), + padding: const EdgeInsets.only(left: 16.0, top: 4.0, bottom: 4.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max, diff --git a/src/lib/presentation/widgets/highlight_artist.dart b/src/lib/presentation/widgets/highlight_artist.dart index 29d1119..38e0ba6 100644 --- a/src/lib/presentation/widgets/highlight_artist.dart +++ b/src/lib/presentation/widgets/highlight_artist.dart @@ -36,37 +36,24 @@ class HighlightArtist extends StatelessWidget { builder: (context) => ArtistDetailsPage(artist: artist), ), ), - child: Container( + child: Card( clipBehavior: Clip.antiAlias, - decoration: BoxDecoration( - color: Theme.of(context).cardColor, - borderRadius: BorderRadius.circular(8.0), - boxShadow: const [ - BoxShadow( - color: Colors.black54, - blurRadius: 8, - offset: Offset(0, 1), - spreadRadius: -5, - ), - ], - ), - child: Material( - color: Colors.transparent, + margin: EdgeInsets.zero, + shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8.0)), + child: Padding( + padding: const EdgeInsets.fromLTRB(12, 12, 0, 12), child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: PlaylistCover( - gradient: CUSTOM_GRADIENTS['kashmir']!, - icon: Icons.person_rounded, - size: 100.0, - circle: true, - ), + PlaylistCover( + gradient: CUSTOM_GRADIENTS['kashmir']!, + icon: Icons.person_rounded, + size: 100.0, + circle: true, ), Expanded( child: Padding( - padding: const EdgeInsets.only(left: 8.0, top: 8.0, bottom: 8.0), + padding: const EdgeInsets.only(left: 16.0, top: 4.0, bottom: 4.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.max,