feat(synced-lyrics): animated active text size

This commit is contained in:
Kingkor Roy Tirtho 2022-09-08 23:28:16 +06:00
parent 64226a7344
commit 531fae64f9

View File

@ -221,22 +221,23 @@ class SyncedLyrics extends HookConsumerWidget {
: Center( : Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: AutoSizeText( child: AnimatedDefaultTextStyle(
lyricSlice.text, duration: const Duration(
maxLines: 2, milliseconds: 250),
style: Theme.of(context) style: TextStyle(
.textTheme color: isActive
.headline4 ? Colors.white
?.copyWith( : palette.bodyTextColor,
color: isActive fontWeight: isActive
? Colors.white ? FontWeight.bold
: palette.bodyTextColor, : FontWeight.normal,
// indicating the active state of that lyric slice fontSize: isActive ? 30 : 26,
fontWeight: isActive ),
? FontWeight.bold child: Text(
: null, lyricSlice.text,
), maxLines: 2,
textAlign: TextAlign.center, textAlign: TextAlign.center,
),
), ),
), ),
), ),