Browse Source

Merge pull request #1006 from nextcloud/fix/neon_dashboard/empty-widget-item-icons

fix(neon_dashboard): Fix empty widget item icon urls
pull/1011/head
Kate 1 year ago committed by GitHub
parent
commit
fcbe8c1f28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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,
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) {

Loading…
Cancel
Save