mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
feat(synced-lyrics): animated active text size
This commit is contained in:
parent
64226a7344
commit
531fae64f9
@ -221,25 +221,26 @@ class SyncedLyrics extends HookConsumerWidget {
|
||||
: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: AutoSizeText(
|
||||
lyricSlice.text,
|
||||
maxLines: 2,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.headline4
|
||||
?.copyWith(
|
||||
child: AnimatedDefaultTextStyle(
|
||||
duration: const Duration(
|
||||
milliseconds: 250),
|
||||
style: TextStyle(
|
||||
color: isActive
|
||||
? Colors.white
|
||||
: palette.bodyTextColor,
|
||||
// indicating the active state of that lyric slice
|
||||
fontWeight: isActive
|
||||
? FontWeight.bold
|
||||
: null,
|
||||
: FontWeight.normal,
|
||||
fontSize: isActive ? 30 : 26,
|
||||
),
|
||||
child: Text(
|
||||
lyricSlice.text,
|
||||
maxLines: 2,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user