getIconWidget method
- BuildContext context
Implementation
Widget getIconWidget(BuildContext context) {
if (iconData != null) {
return Icon(
iconData,
color: Theme.of(context).colorScheme.onSurfaceVariant,
);
} else if (heroIcons != null) {
return HeroIcon(
heroIcons!,
color: Theme.of(context).colorScheme.onSurfaceVariant,
);
} else {
throw Exception("Invalid IconType: both iconData and heroIcon are null");
}
}