mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55: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,
|
BuildContext context,
|
||||||
Track track,
|
Track track,
|
||||||
) {
|
) {
|
||||||
showDialog(
|
/// showDialog doesn't work for some reason. So we have to
|
||||||
context: context,
|
/// manually push a Dialog Route in the Navigator to get it working
|
||||||
builder: (context) => PlaylistAddTrackDialog(
|
Navigator.push(
|
||||||
tracks: [track],
|
context,
|
||||||
openFromPlaylist: playlistId,
|
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