Skip to content

Commit

Permalink
ui: use LinearGradient in CarouselView
Browse files Browse the repository at this point in the history
  • Loading branch information
Yesterday17 committed Sep 18, 2024
1 parent 5285498 commit 8fee4bf
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions lib/ui/page/home/home_playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,27 @@ class PlaylistView extends ConsumerWidget {
Container(
padding: const EdgeInsets.all(4.0),
alignment: Alignment.bottomLeft,
child: Card(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Hero(
tag: 'playlist:name:${playlist.id}',
child: Text(
playlist.name,
style: context.textTheme.titleMedium?.copyWith(
color: context.colorScheme.onSecondaryContainer,
fontWeight: FontWeight.w600,
// backgroundColor: context.colorScheme.secondaryContainer
// .withValues(alpha: 0.8),
),
overflow: TextOverflow.ellipsis,
maxLines: 2,
softWrap: false,
),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Colors.white.withValues(alpha: 0),
Colors.black.withValues(alpha: 0.5),
],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
),
),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Hero(
tag: 'playlist:name:${playlist.id}',
child: Text(
playlist.name,
style: context.textTheme.titleMedium
?.copyWith(color: Colors.white),
overflow: TextOverflow.ellipsis,
maxLines: 2,
softWrap: false,
),
),
),
Expand Down

0 comments on commit 8fee4bf

Please sign in to comment.