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. 7
      packages/neon/neon_dashboard/lib/src/widgets/widget_item.dart

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

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

Loading…
Cancel
Save