getFlagByCountryCode function

String getFlagByCountryCode(
  1. String code
)

Implementation

String getFlagByCountryCode(String code) {
  String flag = code.toUpperCase().replaceAllMapped(RegExp(r'[A-Z]'),
      (match) => String.fromCharCode(match.group(0)!.codeUnitAt(0) + 127397));
  return flag;
}