Skip to content

Commit

Permalink
fix(ui): scaffold exception in fluent_ui
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Mar 7, 2023
1 parent 9b6ccd8 commit 8ce2192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 4 additions & 2 deletions lib/components/lyrics/zoom_controls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ class ZoomControls extends HookWidget {
?.withOpacity(0.7),
borderRadius: BorderRadius.circular(10),
),
constraints:
BoxConstraints(maxHeight: direction == Axis.horizontal ? 50 : 200),
constraints: BoxConstraints(
maxHeight: direction == Axis.horizontal ? 50 : 200,
maxWidth: direction == Axis.vertical ? 50 : double.infinity,
),
margin: const EdgeInsets.all(8),
child: direction == Axis.horizontal
? Row(
Expand Down
6 changes: 0 additions & 6 deletions lib/components/playlist/playlist_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class PlaylistCard extends HookConsumerWidget {

final updating = useState(false);
final spotify = ref.watch(spotifyProvider);
final scaffold = ScaffoldMessenger.of(context);

return PlaybuttonCard(
viewType: viewType,
Expand Down Expand Up @@ -94,11 +93,6 @@ class PlaylistCard extends HookConsumerWidget {

playlistNotifier.add(fetchedTracks);
tracks.value = fetchedTracks;
scaffold.showSnackBar(
SnackBar(
content: Text("Added ${fetchedTracks.length} tracks to queue"),
),
);
} finally {
updating.value = false;
}
Expand Down

0 comments on commit 8ce2192

Please sign in to comment.