mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-12 23:45:18 +00:00
fix: add to playlist not working in smaller screen devices
This commit is contained in:
parent
4072531c62
commit
50123b235c
@ -90,11 +90,25 @@ class TrackOptions extends HookConsumerWidget {
|
||||
BuildContext context,
|
||||
Track track,
|
||||
) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => PlaylistAddTrackDialog(
|
||||
tracks: [track],
|
||||
openFromPlaylist: playlistId,
|
||||
/// showDialog doesn't work for some reason. So we have to
|
||||
/// manually push a Dialog Route in the Navigator to get it working
|
||||
Navigator.push(
|
||||
context,
|
||||
DialogRoute(
|
||||
alignment: Alignment.bottomCenter,
|
||||
transitionBuilder: (context, animation, secondaryAnimation, child) {
|
||||
return FadeTransition(opacity: animation, child: child);
|
||||
},
|
||||
context: context,
|
||||
barrierColor: Colors.black.withValues(alpha: 0.5),
|
||||
builder: (context) {
|
||||
return Center(
|
||||
child: PlaylistAddTrackDialog(
|
||||
tracks: [track],
|
||||
openFromPlaylist: playlistId,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user