fix(ui): scaffold exception in fluent_ui

This commit is contained in:
Kingkor Roy Tirtho 2023-03-07 09:34:11 +06:00
parent 9b6ccd8488
commit 8ce2192e5c
2 changed files with 4 additions and 8 deletions

View File

@ -56,8 +56,10 @@ class ZoomControls extends HookWidget {
?.withOpacity(0.7), ?.withOpacity(0.7),
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
constraints: constraints: BoxConstraints(
BoxConstraints(maxHeight: direction == Axis.horizontal ? 50 : 200), maxHeight: direction == Axis.horizontal ? 50 : 200,
maxWidth: direction == Axis.vertical ? 50 : double.infinity,
),
margin: const EdgeInsets.all(8), margin: const EdgeInsets.all(8),
child: direction == Axis.horizontal child: direction == Axis.horizontal
? Row( ? Row(

View File

@ -37,7 +37,6 @@ class PlaylistCard extends HookConsumerWidget {
final updating = useState(false); final updating = useState(false);
final spotify = ref.watch(spotifyProvider); final spotify = ref.watch(spotifyProvider);
final scaffold = ScaffoldMessenger.of(context);
return PlaybuttonCard( return PlaybuttonCard(
viewType: viewType, viewType: viewType,
@ -94,11 +93,6 @@ class PlaylistCard extends HookConsumerWidget {
playlistNotifier.add(fetchedTracks); playlistNotifier.add(fetchedTracks);
tracks.value = fetchedTracks; tracks.value = fetchedTracks;
scaffold.showSnackBar(
SnackBar(
content: Text("Added ${fetchedTracks.length} tracks to queue"),
),
);
} finally { } finally {
updating.value = false; updating.value = false;
} }