Browse Source

fix(neon_dashboard): Fix empty widget item icon urls

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1006/head
jld3103 1 year ago
parent
commit
9e783ccc84
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 13
      packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart

13
packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart

@ -25,10 +25,15 @@ class DashboardWidgetItem extends StatelessWidget {
dimension: largeIconSize, dimension: largeIconSize,
child: NeonImageWrapper( child: NeonImageWrapper(
borderRadius: roundIcon ? BorderRadius.circular(largeIconSize) : null, borderRadius: roundIcon ? BorderRadius.circular(largeIconSize) : null,
child: NeonUrlImage( child: item.iconUrl.isNotEmpty
url: item.iconUrl, ? NeonUrlImage(
size: const Size.square(largeIconSize), url: item.iconUrl,
), size: const Size.square(largeIconSize),
)
: Icon(
Icons.question_mark,
color: Theme.of(context).colorScheme.error,
),
), ),
); );
if (item.overlayIconUrl.isNotEmpty) { if (item.overlayIconUrl.isNotEmpty) {

Loading…
Cancel
Save