From f6969d678a8483738db1406e694bd3dfef2a4894 Mon Sep 17 00:00:00 2001 From: Kingkor Roy Tirtho Date: Mon, 21 Mar 2022 07:11:51 +0600 Subject: [PATCH] fixed button overflow issue --- lib/components/Lyrics.dart | 3 +-- lib/components/Settings.dart | 9 ++++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/components/Lyrics.dart b/lib/components/Lyrics.dart index 735e00f6..19b0f412 100644 --- a/lib/components/Lyrics.dart +++ b/lib/components/Lyrics.dart @@ -17,8 +17,7 @@ class Lyrics extends HookConsumerWidget { UserPreferences userPreferences = ref.watch(userPreferencesProvider); var lyrics = useState({}); - bool hasToken = (userPreferences.geniusAccessToken != null || - (userPreferences.geniusAccessToken.isNotEmpty)); + bool hasToken = userPreferences.geniusAccessToken.isNotEmpty; var lyricsFuture = useMemoized(() { if (playback.currentTrack == null || !hasToken || diff --git a/lib/components/Settings.dart b/lib/components/Settings.dart index ed5609f5..408a44a8 100644 --- a/lib/components/Settings.dart +++ b/lib/components/Settings.dart @@ -140,10 +140,13 @@ class Settings extends HookConsumerWidget { ), const SizedBox(height: 10), if (auth.isAnonymous) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + Wrap( + alignment: WrapAlignment.spaceBetween, + runAlignment: WrapAlignment.center, + crossAxisAlignment: WrapCrossAlignment.center, children: [ - const Text("Login with your Spotify"), + const Text("Login with your Spotify account"), + const SizedBox(width: 20), ElevatedButton( child: Text("Connect with Spotify".toUpperCase()), onPressed: () {