mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55: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(
|
: 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
|
|
||||||
.headline4
|
|
||||||
?.copyWith(
|
|
||||||
color: isActive
|
color: isActive
|
||||||
? Colors.white
|
? Colors.white
|
||||||
: palette.bodyTextColor,
|
: palette.bodyTextColor,
|
||||||
// indicating the active state of that lyric slice
|
|
||||||
fontWeight: isActive
|
fontWeight: isActive
|
||||||
? FontWeight.bold
|
? FontWeight.bold
|
||||||
: null,
|
: FontWeight.normal,
|
||||||
|
fontSize: isActive ? 30 : 26,
|
||||||
),
|
),
|
||||||
|
child: Text(
|
||||||
|
lyricSlice.text,
|
||||||
|
maxLines: 2,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user