buildFlagIconForCountry function

Widget? buildFlagIconForCountry(
  1. String key, {
  2. Widget flagIconBuilder(
    1. String
    )?,
  3. bool hasShadow = true,
  4. double? height,
  5. double? width,
})

Implementation

Widget? buildFlagIconForCountry(
  String key, {
  Widget Function(String)? flagIconBuilder,
  bool hasShadow = true,
  double? height,
  double? width,
}) {
  final iconKey = toCamelCase(key);
  final hasIcon = kFastImageFlagMap.containsKey(iconKey);

  if (!hasIcon) {
    debugLog('No flag icon found for country: $key');
    return null;
  }

  return buildFlagIcon(
    key,
    kFastImageFlagMap,
    flagIconBuilder: flagIconBuilder,
    hasShadow: hasShadow,
    height: height,
    width: width,
  );
}