diff --git a/lib/widgets/playlist_bar.dart b/lib/widgets/playlist_bar.dart index 53429568..fee9cf7d 100644 --- a/lib/widgets/playlist_bar.dart +++ b/lib/widgets/playlist_bar.dart @@ -51,6 +51,7 @@ class PlaylistBar extends StatelessWidget { @override Widget build(BuildContext context) { final primaryColor = Theme.of(context).colorScheme.primary; + Map? updatedPlaylist; return Padding( padding: commonBarPadding, child: GestureDetector( @@ -61,10 +62,18 @@ class PlaylistBar extends StatelessWidget { MaterialPageRoute( builder: (context) => PlaylistPage( playlistId: playlistId, - playlistData: playlistData, + playlistData: updatedPlaylist ?? playlistData, ), ), - ); + ).then((isPlaylistUpdated) { + if (isPlaylistUpdated != null && isPlaylistUpdated) { + getPlaylistInfoForWidget(playlistId).then( + (result) => { + updatedPlaylist = result, + }, + ); + } + }); }, child: Card( shape: RoundedRectangleBorder(