From 9e783ccc8436b7474e61a375b4a8c854d47f93fa Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 20 Oct 2023 09:41:12 +0200 Subject: [PATCH] fix(neon_dashboard): Fix empty widget item icon urls Signed-off-by: jld3103 --- .../neon_dashboard/lib/src/widgets/widget_item.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart b/packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart index d0502e90..7022d8d6 100644 --- a/packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart +++ b/packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart @@ -25,10 +25,15 @@ class DashboardWidgetItem extends StatelessWidget { dimension: largeIconSize, child: NeonImageWrapper( borderRadius: roundIcon ? BorderRadius.circular(largeIconSize) : null, - child: NeonUrlImage( - url: item.iconUrl, - size: const Size.square(largeIconSize), - ), + child: item.iconUrl.isNotEmpty + ? NeonUrlImage( + url: item.iconUrl, + size: const Size.square(largeIconSize), + ) + : Icon( + Icons.question_mark, + color: Theme.of(context).colorScheme.error, + ), ), ); if (item.overlayIconUrl.isNotEmpty) {