buildFlagIconForCommodity function
Implementation
Widget? buildFlagIconForCommodity(
String key, {
Widget Function(String)? flagIconBuilder,
bool hasShadow = true,
double? height,
double? width,
}) {
final iconKey = toCamelCase(key);
final hasIcon = kFastImageCommodityMap.containsKey(iconKey);
if (!hasIcon) {
debugLog('No flag icon found for commodity: $key');
return null;
}
return buildFlagIcon(
key,
kFastImageCommodityMap,
flagIconBuilder: flagIconBuilder,
hasShadow: hasShadow,
height: height,
width: width,
);
}