Skip to content

Instantly share code, notes, and snippets.

@Soorya-S
Last active July 22, 2023 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Soorya-S/e431d12f04cf851dd96f85e059e747c3 to your computer and use it in GitHub Desktop.
Save Soorya-S/e431d12f04cf851dd96f85e059e747c3 to your computer and use it in GitHub Desktop.
Flutter code to map country code, country name with it's currency.
class CountryCurrency {
final String country;
final String countryCode;
final String currency;
final String code;
CountryCurrency(this.country, this.countryCode, this.currency, this.code);
}
class CountryCurrencyMapping {
static List<CountryCurrency> countryCurrencyList = [
CountryCurrency("New Zealand", "NZ", "New Zealand Dollars", "NZD"),
CountryCurrency("Cook Islands", "CK", "New Zealand Dollars", "NZD"),
CountryCurrency("Niue", "NU", "New Zealand Dollars", "NZD"),
CountryCurrency("Pitcairn", "PN", "New Zealand Dollars", "NZD"),
CountryCurrency("Tokelau", "TK", "New Zealand Dollars", "NZD"),
CountryCurrency("Australian", "AU", "Australian Dollars", "AUD"),
CountryCurrency("Christmas Island", "CX", "Australian Dollars", "AUD"),
CountryCurrency(
"Cocos (Keeling) Islands", "CC", "Australian Dollars", "AUD"),
CountryCurrency(
"Heard and Mc Donald Islands", "HM", "Australian Dollars", "AUD"),
CountryCurrency("Kiribati", "KI", "Australian Dollars", "AUD"),
CountryCurrency("Nauru", "NR", "Australian Dollars", "AUD"),
CountryCurrency("Norfolk Island", "NF", "Australian Dollars", "AUD"),
CountryCurrency("Tuvalu", "TV", "Australian Dollars", "AUD"),
CountryCurrency("American Samoa", "AS", "Euros", "EUR"),
CountryCurrency("Andorra", "AD", "Euros", "EUR"),
CountryCurrency("Austria", "AT", "Euros", "EUR"),
CountryCurrency("Belgium", "BE", "Euros", "EUR"),
CountryCurrency("Finland", "FI", "Euros", "EUR"),
CountryCurrency("France", "FR", "Euros", "EUR"),
CountryCurrency("French Guiana", "GF", "Euros", "EUR"),
CountryCurrency("French Southern Territories", "TF", "Euros", "EUR"),
CountryCurrency("Germany", "DE", "Euros", "EUR"),
CountryCurrency("Greece", "GR", "Euros", "EUR"),
CountryCurrency("Guadeloupe", "GP", "Euros", "EUR"),
CountryCurrency("Ireland", "IE", "Euros", "EUR"),
CountryCurrency("Italy", "IT", "Euros", "EUR"),
CountryCurrency("Luxembourg", "LU", "Euros", "EUR"),
CountryCurrency("Martinique", "MQ", "Euros", "EUR"),
CountryCurrency("Mayotte", "YT", "Euros", "EUR"),
CountryCurrency("Monaco", "MC", "Euros", "EUR"),
CountryCurrency("Netherlands", "NL", "Euros", "EUR"),
CountryCurrency("Portugal", "PT", "Euros", "EUR"),
CountryCurrency("Reunion", "RE", "Euros", "EUR"),
CountryCurrency("Samoa", "WS", "Euros", "EUR"),
CountryCurrency("San Marino", "SM", "Euros", "EUR"),
CountryCurrency("Slovenia", "SI", "Euros", "EUR"),
CountryCurrency("Spain", "ES", "Euros", "EUR"),
CountryCurrency("Vatican City State (Holy See)", "VA", "Euros", "EUR"),
CountryCurrency("South Georgia and the South Sandwich Islands", "GS",
"Sterling", "GBP"),
CountryCurrency("United Kingdom", "GB", "Sterling", "GBP"),
CountryCurrency("Jersey", "JE", "Sterling", "GBP"),
CountryCurrency("British Indian Ocean Territory", "IO", "USD", "USD"),
CountryCurrency("Guam", "GU", "USD", "USD"),
CountryCurrency("Marshall Islands", "MH", "USD", "USD"),
CountryCurrency("Micronesia Federated States of", "FM", "USD", "USD"),
CountryCurrency("Northern Mariana Islands", "MP", "USD", "USD"),
CountryCurrency("Palau", "PW", "USD", "USD"),
CountryCurrency("Puerto Rico", "PR", "USD", "USD"),
CountryCurrency("Turks and Caicos Islands", "TC", "USD", "USD"),
CountryCurrency("United States", "US", "USD", "USD"),
CountryCurrency("United States Minor Outlying Islands", "UM", "USD", "USD"),
CountryCurrency("Virgin Islands (British)", "VG", "USD", "USD"),
CountryCurrency("Virgin Islands (US)", "VI", "USD", "USD"),
CountryCurrency("Hong Kong", "HK", "HKD", "HKD"),
CountryCurrency("Canada", "CA", "Canadian Dollar", "CAD"),
CountryCurrency("Japan", "JP", "Japanese Yen", "JPY"),
CountryCurrency("Afghanistan", "AF", "Afghani", "AFN"),
CountryCurrency("Albania", "AL", "Lek", "ALL"),
CountryCurrency("Algeria", "DZ", "Algerian Dinar", "DZD"),
CountryCurrency("Anguilla", "AI", "East Caribbean Dollar", "XCD"),
CountryCurrency(
"Antigua and Barbuda", "AG", "East Caribbean Dollar", "XCD"),
CountryCurrency("Dominica", "DM", "East Caribbean Dollar", "XCD"),
CountryCurrency("Grenada", "GD", "East Caribbean Dollar", "XCD"),
CountryCurrency("Montserrat", "MS", "East Caribbean Dollar", "XCD"),
CountryCurrency("Saint Kitts", "KN", "East Caribbean Dollar", "XCD"),
CountryCurrency("Saint Lucia", "LC", "East Caribbean Dollar", "XCD"),
CountryCurrency(
"Saint Vincent Grenadines", "VC", "East Caribbean Dollar", "XCD"),
CountryCurrency("Argentina", "AR", "Peso", "ARS"),
CountryCurrency("Armenia", "AM", "Dram", "AMD"),
CountryCurrency("Aruba", "AW", "Netherlands Antilles Guilder", "ANG"),
CountryCurrency(
"Netherlands Antilles", "AN", "Netherlands Antilles Guilder", "ANG"),
CountryCurrency("Azerbaijan", "AZ", "Manat", "AZN"),
CountryCurrency("Bahamas", "BS", "Bahamian Dollar", "BSD"),
CountryCurrency("Bahrain", "BH", "Bahraini Dinar", "BHD"),
CountryCurrency("Bangladesh", "BD", "Taka", "BDT"),
CountryCurrency("Barbados", "BB", "Barbadian Dollar", "BBD"),
CountryCurrency("Belarus", "BY", "Belarus Ruble", "BYR"),
CountryCurrency("Belize", "BZ", "Belizean Dollar", "BZD"),
CountryCurrency("Benin", "BJ", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Burkina Faso", "BF", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Guinea-Bissau", "GW", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Ivory Coast", "CI", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Mali", "ML", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Niger", "NE", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Senegal", "SN", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Togo", "TG", "CFA Franc BCEAO", "XOF"),
CountryCurrency("Bermuda", "BM", "Bermudian Dollar", "BMD"),
CountryCurrency("Bhutan", "BT", "Indian Rupee", "INR"),
CountryCurrency("India", "IN", "Indian Rupee", "INR"),
CountryCurrency("Bolivia", "BO", "Boliviano", "BOB"),
CountryCurrency("Botswana", "BW", "Pula", "BWP"),
CountryCurrency("Bouvet Island", "BV", "Norwegian Krone", "NOK"),
CountryCurrency("Norway", "NO", "Norwegian Krone", "NOK"),
CountryCurrency(
"Svalbard and Jan Mayen Islands", "SJ", "Norwegian Krone", "NOK"),
CountryCurrency("Brazil", "BR", "Brazil", "BRL"),
CountryCurrency("Brunei Darussalam", "BN", "Bruneian Dollar", "BND"),
CountryCurrency("Bulgaria", "BG", "Lev", "BGN"),
CountryCurrency("Burundi", "BI", "Burundi Franc", "BIF"),
CountryCurrency("Cambodia", "KH", "Riel", "KHR"),
CountryCurrency("Cameroon", "CM", "CFA Franc BEAC", "XAF"),
CountryCurrency("Central African Republic", "CF", "CFA Franc BEAC", "XAF"),
CountryCurrency("Chad", "TD", "CFA Franc BEAC", "XAF"),
CountryCurrency(
"Congo Republic of the Democratic", "CG", "CFA Franc BEAC", "XAF"),
CountryCurrency("Equatorial Guinea", "GQ", "CFA Franc BEAC", "XAF"),
CountryCurrency("Gabon", "GA", "CFA Franc BEAC", "XAF"),
CountryCurrency("Cape Verde", "CV", "Escudo", "CVE"),
CountryCurrency("Cayman Islands", "KY", "Caymanian Dollar", "KYD"),
CountryCurrency("Chile", "CL", "Chilean Peso", "CLP"),
CountryCurrency("China", "CN", "Yuan Renminbi", "CNY"),
CountryCurrency("Colombia", "CO", "Peso", "COP"),
CountryCurrency("Comoros", "KM", "Comoran Franc", "KMF"),
CountryCurrency("Congo-Brazzaville", "CD", "Congolese Frank", "CDF"),
CountryCurrency("Costa Rica", "CR", "Costa Rican Colon", "CRC"),
CountryCurrency("Croatia (Hrvatska)", "HR", "Croatian Dinar", "HRK"),
CountryCurrency("Cuba", "CU", "Cuban Peso", "CUP"),
CountryCurrency("Cyprus", "CY", "Cypriot Pound", "CYP"),
CountryCurrency("Czech Republic", "CZ", "Koruna", "CZK"),
CountryCurrency("Denmark", "DK", "Danish Krone", "DKK"),
CountryCurrency("Faroe Islands", "FO", "Danish Krone", "DKK"),
CountryCurrency("Greenland", "GL", "Danish Krone", "DKK"),
CountryCurrency("Djibouti", "DJ", "Djiboutian Franc", "DJF"),
CountryCurrency("Dominican Republic", "DO", "Dominican Peso", "DOP"),
CountryCurrency("East Timor", "TP", "Indonesian Rupiah", "IDR"),
CountryCurrency("Indonesia", "ID", "Indonesian Rupiah", "IDR"),
CountryCurrency("Ecuador", "EC", "Sucre", "ECS"),
CountryCurrency("Egypt", "EG", "Egyptian Pound", "EGP"),
CountryCurrency("El Salvador", "SV", "Salvadoran Colon", "SVC"),
CountryCurrency("Eritrea", "ER", "Ethiopian Birr", "ETB"),
CountryCurrency("Ethiopia", "ET", "Ethiopian Birr", "ETB"),
CountryCurrency("Estonia", "EE", "Estonian Kroon", "EEK"),
CountryCurrency(
"Falkland Islands (Malvinas)", "FK", "Falkland Pound", "FKP"),
CountryCurrency("Fiji", "FJ", "Fijian Dollar", "FJD"),
CountryCurrency("French Polynesia", "PF", "CFP Franc", "XPF"),
CountryCurrency("New Caledonia", "NC", "CFP Franc", "XPF"),
CountryCurrency("Wallis and Futuna Islands", "WF", "CFP Franc", "XPF"),
CountryCurrency("Gambia", "GM", "Dalasi", "GMD"),
CountryCurrency("Georgia", "GE", "Lari", "GEL"),
CountryCurrency("Gibraltar", "GI", "Gibraltar Pound", "GIP"),
CountryCurrency("Guatemala", "GT", "Quetzal", "GTQ"),
CountryCurrency("Guinea", "GN", "Guinean Franc", "GNF"),
CountryCurrency("Guyana", "GY", "Guyanaese Dollar", "GYD"),
CountryCurrency("Haiti", "HT", "Gourde", "HTG"),
CountryCurrency("Honduras", "HN", "Lempira", "HNL"),
CountryCurrency("Hungary", "HU", "Forint", "HUF"),
CountryCurrency("Iceland", "IS", "Icelandic Krona", "ISK"),
CountryCurrency("Iran (Islamic Republic of)", "IR", "Iranian Rial", "IRR"),
CountryCurrency("Iraq", "IQ", "Iraqi Dinar", "IQD"),
CountryCurrency("Israel", "IL", "Shekel", "ILS"),
CountryCurrency("Jamaica", "JM", "Jamaican Dollar", "JMD"),
CountryCurrency("Jordan", "JO", "Jordanian Dinar", "JOD"),
CountryCurrency("Kazakhstan", "KZ", "Tenge", "KZT"),
CountryCurrency("Kenya", "KE", "Kenyan Shilling", "KES"),
CountryCurrency("Korea North", "KP", "Won", "KPW"),
CountryCurrency("Korea South", "KR", "Won", "KRW"),
CountryCurrency("Kuwait", "KW", "Kuwaiti Dinar", "KWD"),
CountryCurrency("Kyrgyzstan", "KG", "Som", "KGS"),
CountryCurrency("Lao PeopleÕs Democratic Republic", "LA", "Kip", "LAK"),
CountryCurrency("Latvia", "LV", "Lat", "LVL"),
CountryCurrency("Lebanon", "LB", "Lebanese Pound", "LBP"),
CountryCurrency("Lesotho", "LS", "Loti", "LSL"),
CountryCurrency("Liberia", "LR", "Liberian Dollar", "LRD"),
CountryCurrency("Libyan Arab Jamahiriya", "LY", "Libyan Dinar", "LYD"),
CountryCurrency("Liechtenstein", "LI", "Swiss Franc", "CHF"),
CountryCurrency("Switzerland", "CH", "Swiss Franc", "CHF"),
CountryCurrency("Lithuania", "LT", "Lita", "LTL"),
CountryCurrency("Macau", "MO", "Pataca", "MOP"),
CountryCurrency("Macedonia", "MK", "Denar", "MKD"),
CountryCurrency("Madagascar", "MG", "Malagasy Franc", "MGA"),
CountryCurrency("Malawi", "MW", "Malawian Kwacha", "MWK"),
CountryCurrency("Malaysia", "MY", "Ringgit", "MYR"),
CountryCurrency("Maldives", "MV", "Rufiyaa", "MVR"),
CountryCurrency("Malta", "MT", "Maltese Lira", "MTL"),
CountryCurrency("Mauritania", "MR", "Ouguiya", "MRO"),
CountryCurrency("Mauritius", "MU", "Mauritian Rupee", "MUR"),
CountryCurrency("Mexico", "MX", "Peso", "MXN"),
CountryCurrency("Moldova Republic of", "MD", "Leu", "MDL"),
CountryCurrency("Mongolia", "MN", "Tugrik", "MNT"),
CountryCurrency("Morocco", "MA", "Dirham", "MAD"),
CountryCurrency("Western Sahara", "EH", "Dirham", "MAD"),
CountryCurrency("Mozambique", "MZ", "Metical", "MZN"),
CountryCurrency("Myanmar", "MM", "Kyat", "MMK"),
CountryCurrency("Namibia", "NA", "Dollar", "NAD"),
CountryCurrency("Nepal", "NP", "Nepalese Rupee", "NPR"),
CountryCurrency("Nicaragua", "NI", "Cordoba Oro", "NIO"),
CountryCurrency("Nigeria", "NG", "Naira", "NGN"),
CountryCurrency("Oman", "OM", "Sul Rial", "OMR"),
CountryCurrency("Pakistan", "PK", "Rupee", "PKR"),
CountryCurrency("Panama", "PA", "Balboa", "PAB"),
CountryCurrency("Papua New Guinea", "PG", "Kina", "PGK"),
CountryCurrency("Paraguay", "PY", "Guarani", "PYG"),
CountryCurrency("Peru", "PE", "Nuevo Sol", "PEN"),
CountryCurrency("Philippines", "PH", "Peso", "PHP"),
CountryCurrency("Poland", "PL", "Zloty", "PLN"),
CountryCurrency("Qatar", "QA", "Rial", "QAR"),
CountryCurrency("Romania", "RO", "Leu", "RON"),
CountryCurrency("Russian Federation", "RU", "Ruble", "RUB"),
CountryCurrency("Rwanda", "RW", "Rwanda Franc", "RWF"),
CountryCurrency("Sao Tome and Principe", "ST", "Dobra", "STD"),
CountryCurrency("Saudi Arabia", "SA", "Riyal", "SAR"),
CountryCurrency("Seychelles", "SC", "Rupee", "SCR"),
CountryCurrency("Sierra Leone", "SL", "Leone", "SLL"),
CountryCurrency("Singapore", "SG", "Dollar", "SGD"),
CountryCurrency("Slovakia (Slovak Republic)", "SK", "Koruna", "SKK"),
CountryCurrency("Solomon Islands", "SB", "Solomon Islands Dollar", "SBD"),
CountryCurrency("Somalia", "SO", "Shilling", "SOS"),
CountryCurrency("South Africa", "ZA", "Rand", "ZAR"),
CountryCurrency("Sri Lanka", "LK", "Rupee", "LKR"),
CountryCurrency("Sudan", "SD", "Dinar", "SDG"),
CountryCurrency("Suriname", "SR", "Surinamese Guilder", "SRD"),
CountryCurrency("Swaziland", "SZ", "Lilangeni", "SZL"),
CountryCurrency("Sweden", "SE", "Krona", "SEK"),
CountryCurrency("Syrian Arab Republic", "SY", "Syrian Pound", "SYP"),
CountryCurrency("Taiwan", "TW", "Dollar", "TWD"),
CountryCurrency("Tajikistan", "TJ", "Tajikistan Ruble", "TJS"),
CountryCurrency("Tanzania", "TZ", "Shilling", "TZS"),
CountryCurrency("Thailand", "TH", "Baht", "THB"),
CountryCurrency("Tonga", "TO", "PaÕanga", "TOP"),
CountryCurrency(
"Trinidad and Tobago", "TT", "Trinidad and Tobago Dollar", "TTD"),
CountryCurrency("Tunisia", "TN", "Tunisian Dinar", "TND"),
CountryCurrency("Turkey", "TR", "Lira", "TRY"),
CountryCurrency("Turkmenistan", "TM", "Manat", "TMT"),
CountryCurrency("Uganda", "UG", "Shilling", "UGX"),
CountryCurrency("Ukraine", "UA", "Hryvnia", "UAH"),
CountryCurrency("United Arab Emirates", "AE", "Dirham", "AED"),
CountryCurrency("Uruguay", "UY", "Peso", "UYU"),
CountryCurrency("Uzbekistan", "UZ", "Som", "UZS"),
CountryCurrency("Vanuatu", "VU", "Vatu", "VUV"),
CountryCurrency("Venezuela", "VE", "Bolivar", "VEF"),
CountryCurrency("Vietnam", "VN", "Dong", "VND"),
CountryCurrency("Yemen", "YE", "Rial", "YER"),
CountryCurrency("Zambia", "ZM", "Kwacha", "ZMK"),
CountryCurrency("Zimbabwe", "ZW", "Zimbabwe Dollar", "ZWD"),
CountryCurrency("Aland Islands", "AX", "Euro", "EUR"),
CountryCurrency("Angola", "AO", "Angolan kwanza", "AOA"),
CountryCurrency("Antarctica", "AQ", "Antarctican dollar", "AQD"),
CountryCurrency("Bosnia and Herzegovina", "BA",
"Bosnia and Herzegovina convertible mark", "BAM"),
CountryCurrency("Congo (Kinshasa)", "CD", "Congolese Frank", "CDF"),
CountryCurrency("Ghana", "GH", "Ghana cedi", "GHS"),
CountryCurrency("Guernsey", "GG", "Guernsey pound", "GGP"),
CountryCurrency("Isle of Man", "IM", "Manx pound", "GBP"),
CountryCurrency("Laos", "LA", "Lao kip", "LAK"),
CountryCurrency("Macao S.A.R.", "MO", "Macanese pataca", "MOP"),
CountryCurrency("Montenegro", "ME", "Euro", "EUR"),
CountryCurrency("Palestinian Territory", "PS", "Jordanian dinar", "JOD"),
CountryCurrency("Saint Barthelemy", "BL", "Euro", "EUR"),
CountryCurrency("Saint Helena", "SH", "Saint Helena pound", "GBP"),
CountryCurrency("Saint Martin (French part)", "MF",
"Netherlands Antillean guilder", "ANG"),
CountryCurrency("Saint Pierre and Miquelon", "PM", "Euro", "EUR"),
CountryCurrency("Serbia", "RS", "Serbian dinar", "RSD"),
CountryCurrency("US Armed Forces", "USAF", "US Dollar", "USD")
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment