diff --git a/lib/components/Artist/ArtistCard.dart b/lib/components/Artist/ArtistCard.dart index 9f2ead1a..c09fd3af 100644 --- a/lib/components/Artist/ArtistCard.dart +++ b/lib/components/Artist/ArtistCard.dart @@ -1,6 +1,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; +import 'package:marquee/marquee.dart'; import 'package:spotify/spotify.dart'; class ArtistCard extends StatelessWidget { @@ -41,10 +42,29 @@ class ArtistCard extends StatelessWidget { minRadius: 20, backgroundImage: backgroundImage, ), - Text( - artist.name!, - style: Theme.of(context).textTheme.headline5, - overflow: TextOverflow.ellipsis, + SizedBox( + height: 30, + child: artist.name!.length > 15 + ? Marquee( + text: artist.name!, + style: Theme.of(context).textTheme.headline5, + scrollAxis: Axis.horizontal, + crossAxisAlignment: CrossAxisAlignment.start, + blankSpace: 60.0, + velocity: 30.0, + startAfter: const Duration(seconds: 2), + pauseAfterRound: const Duration(seconds: 2), + accelerationDuration: const Duration(seconds: 1), + accelerationCurve: Curves.linear, + decelerationDuration: const Duration(milliseconds: 500), + decelerationCurve: Curves.easeOut, + fadingEdgeStartFraction: 0.15, + fadingEdgeEndFraction: 0.15, + ) + : Text( + artist.name!, + style: Theme.of(context).textTheme.headline5, + ), ), Text( "Artist", diff --git a/lib/components/Shared/PlaybuttonCard.dart b/lib/components/Shared/PlaybuttonCard.dart index f0a71fd9..a68ca745 100644 --- a/lib/components/Shared/PlaybuttonCard.dart +++ b/lib/components/Shared/PlaybuttonCard.dart @@ -114,13 +114,14 @@ class PlaybuttonCard extends StatelessWidget { velocity: 30.0, startAfter: const Duration(seconds: 2), pauseAfterRound: const Duration(seconds: 2), - startPadding: 10.0, accelerationDuration: const Duration(seconds: 1), accelerationCurve: Curves.linear, decelerationDuration: const Duration(milliseconds: 500), decelerationCurve: Curves.easeOut, + fadingEdgeStartFraction: 0.15, + fadingEdgeEndFraction: 0.15, ) : Text( description!,