fix lyrics text not centered
This commit is contained in:
parent
1738c1bf00
commit
aaacd150a5
|
@ -136,9 +136,8 @@ class _LyricsWidgetState extends State<LyricsWidget>
|
|||
//Lyric height, screen height, appbar height
|
||||
final actualHeight =
|
||||
height + (_showTranslation ? additionalTranslationHeight : 0.0);
|
||||
// _currentIndex + 1 because there's also the initial one
|
||||
final minScroll = actualHeight * (_currentIndex + 1);
|
||||
double scrollTo = minScroll + height / 2;
|
||||
// _currentIndex + 1 because there's also the initial one (though we need to sum half)
|
||||
var scrollTo = actualHeight * (_currentIndex + 1);
|
||||
|
||||
if (scrollTo < 0.0) scrollTo = 0.0;
|
||||
if (scrollTo > _controller.position.maxScrollExtent) {
|
||||
|
|
Loading…
Reference in New Issue