From 018df39eae11f5ab40b2d0e3ad1bfd9d5cfd4916 Mon Sep 17 00:00:00 2001 From: Feichtmeier Date: Mon, 11 Mar 2024 22:29:26 +0100 Subject: [PATCH] fix npe --- lib/src/common/audio_card.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/src/common/audio_card.dart b/lib/src/common/audio_card.dart index 25ce8d734..36b4cc259 100644 --- a/lib/src/common/audio_card.dart +++ b/lib/src/common/audio_card.dart @@ -59,7 +59,7 @@ class _AudioCardState extends State { child: Stack( children: [ if (widget.background != null) widget.background!, - if (widget.image == null && widget.background != null) + if (widget.image == null) Shimmer.fromColors( baseColor: light ? kCardColorLight : kCardColorDark, highlightColor: light @@ -68,9 +68,8 @@ class _AudioCardState extends State { child: Container( color: light ? kCardColorLight : kCardColorDark, ), - ) - else - widget.image!, + ), + if (widget.image != null) widget.image!, if (_hovered && widget.onPlay != null) Positioned( bottom: 10,