getIconFromName static method
Implementation
static Widget? getIconFromName(String name,
{Color? color,
Key? key,
String? semanticLabel,
double size = 20,
TextDirection? textDirection}) {
sizes = size;
Widget? icon = iconList[name];
if (icon.runtimeType == Icon) {
icon = Icon(
(icon as Icon).icon,
color: color,
key: key,
semanticLabel: semanticLabel,
size: size,
textDirection: textDirection,
);
} else {
icon = faIconList[name];
if (icon.runtimeType == FaIcon) {
icon = FaIcon(
(icon as FaIcon).icon,
color: color,
key: key,
semanticLabel: semanticLabel,
size: size,
textDirection: textDirection,
);
}
}
return icon;
}