|
|
@ -47,11 +47,7 @@ class DashboardWidget extends StatelessWidget { |
|
|
|
), |
|
|
|
), |
|
|
|
leading: SizedBox.square( |
|
|
|
leading: SizedBox.square( |
|
|
|
dimension: largeIconSize, |
|
|
|
dimension: largeIconSize, |
|
|
|
child: NeonUrlImage( |
|
|
|
child: _buildWidgetIcon(context), |
|
|
|
url: widget.iconUrl, |
|
|
|
|
|
|
|
svgColorFilter: ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn), |
|
|
|
|
|
|
|
size: const Size.square(largeIconSize), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox( |
|
|
|
const SizedBox( |
|
|
@ -82,6 +78,32 @@ class DashboardWidget extends StatelessWidget { |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget? _buildWidgetIcon(final BuildContext context) { |
|
|
|
|
|
|
|
final colorFilter = ColorFilter.mode(Theme.of(context).colorScheme.primary, BlendMode.srcIn); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (widget.iconUrl.isNotEmpty) { |
|
|
|
|
|
|
|
return NeonUrlImage( |
|
|
|
|
|
|
|
url: widget.iconUrl, |
|
|
|
|
|
|
|
svgColorFilter: colorFilter, |
|
|
|
|
|
|
|
size: const Size.square(largeIconSize), |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (widget.iconClass.isNotEmpty) { |
|
|
|
|
|
|
|
return NeonServerIcon( |
|
|
|
|
|
|
|
icon: widget.iconClass, |
|
|
|
|
|
|
|
colorFilter: colorFilter, |
|
|
|
|
|
|
|
size: largeIconSize, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Icon( |
|
|
|
|
|
|
|
Icons.question_mark, |
|
|
|
|
|
|
|
color: Theme.of(context).colorScheme.primary, |
|
|
|
|
|
|
|
size: largeIconSize, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Widget? _renderMessage(final String? message) { |
|
|
|
Widget? _renderMessage(final String? message) { |
|
|
|
if (message == null || message.isEmpty) { |
|
|
|
if (message == null || message.isEmpty) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|