buildFlagIcon function
Implementation
Widget? buildFlagIcon(
String key,
Map<String, String> iconMap, {
Widget Function(String)? flagIconBuilder,
bool hasShadow = true,
double? height,
double? width,
}) {
final iconKey = toCamelCase(key);
late Widget flagIcon;
if (flagIconBuilder != null) {
flagIcon = flagIconBuilder(key);
} else {
flagIcon = FastImageAsset(
path: iconMap[iconKey]!,
height: height,
width: width,
);
}
if (hasShadow) {
return FastShadowLayout(
borderRadius: 0,
child: flagIcon,
);
}
return flagIcon;
}