I am building a music player in which I'm using on_audio_query package to get details of songs and QueryArtworkWidget and realtimeplayinginfos to display the image corresponding to the song. But while Iam playing the song, the image is blinking. Does anyone knows how to fix this?
ClipRRect(
borderRadius: BorderRadius.circular(10),
child: QueryArtworkWidget(
nullArtworkWidget: Icon(
Icons.music_note,
color: white,
size: 40,
),
id: int.parse(realtimePlayingInfos.current!.audio.audio.metas.id!),
type: ArtworkType.AUDIO))
CodePudding user response:
Try to add a key
keepOldArtWork = true;