fixed button overflow issue

This commit is contained in:
Kingkor Roy Tirtho 2022-03-21 07:11:51 +06:00
parent b4e79ce7ff
commit f6969d678a
2 changed files with 7 additions and 5 deletions

View File

@ -17,8 +17,7 @@ class Lyrics extends HookConsumerWidget {
UserPreferences userPreferences = ref.watch(userPreferencesProvider); UserPreferences userPreferences = ref.watch(userPreferencesProvider);
var lyrics = useState({}); var lyrics = useState({});
bool hasToken = (userPreferences.geniusAccessToken != null || bool hasToken = userPreferences.geniusAccessToken.isNotEmpty;
(userPreferences.geniusAccessToken.isNotEmpty));
var lyricsFuture = useMemoized(() { var lyricsFuture = useMemoized(() {
if (playback.currentTrack == null || if (playback.currentTrack == null ||
!hasToken || !hasToken ||

View File

@ -140,10 +140,13 @@ class Settings extends HookConsumerWidget {
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
if (auth.isAnonymous) if (auth.isAnonymous)
Row( Wrap(
mainAxisAlignment: MainAxisAlignment.spaceBetween, alignment: WrapAlignment.spaceBetween,
runAlignment: WrapAlignment.center,
crossAxisAlignment: WrapCrossAlignment.center,
children: [ children: [
const Text("Login with your Spotify"), const Text("Login with your Spotify account"),
const SizedBox(width: 20),
ElevatedButton( ElevatedButton(
child: Text("Connect with Spotify".toUpperCase()), child: Text("Connect with Spotify".toUpperCase()),
onPressed: () { onPressed: () {