flutter_country

enter image description here enter image description here enter image description here enter image description here

A lite flutter package for providing World Country Data without internet connection

Installation

depend on the package in your pubspec.yaml :

 dependencies:
    flutter_country: ^0.1.0

get the packages :

flutter pub get

Parameters

This is a list of the properties that can be provided for each country

ParameterReturn TypeOutput Example
nameStringEgypt
nativeNameTranslationListجمهورية مصر العربية
translationsTranslationListTranslationList(translations:List)
demonymString'Egyptian'
altSpellingsList "EG" , "Arab Republic of Egypt"
alpha2CodeStringEG
alpha3CodeStringEGY
numericCodeString818
topLevelDomainList'.eg'
capitalStringCairo
regionStringAfrica
currneciesCurrencyListCurrencyList(currencies:List);
languagesMap<String, dynamic>{ 'eng' : 'English' , 'ara' : 'Arabic ' }
bordersList"LBY","PSE","SDN"
area in kmdouble1002450.0
flagsList"https://restcountries.com/data/egy.svg","https://restcountries.com/data/png/egy.png"
flagIconString🇪🇬
phoneCodeList+20
latitiudedouble27
longitudedouble30

Methods

This is a list of the methods you can get country data by :

MethodReturn TypeDescriptionExample
all()Listget all countries dataCountries.all()
byName()Countryget country by nameCountries.byName('Egypt')
byCode()Countryget country by alpha2 codeCountries.byCode('EG')
byAlph3Code()Countryget country by alpha3 codeCountries.byAlpha3Code('EGY')
byNumericCode()Countryget country by numeric codeCountries.byNumericCode('818')
byCallingCodes()Countryget country by phone codeCountries.byCallingCodes('+20')
byCapital()Countryget country by capitalCountries.byCapital('Cairo')
byFlag()Countryget country by flag emojiCountries.byFlag('🇪🇬')
byLanguageCode()Listget country by language codeCountries.byLanguageCode('ara')
byLanguageName()Listget country by language nameCountries.byLanguageName('Arabic')
unMembers()Listget UN Members countriesCountries.unMembers()
byRegion()Listget countries by regionCountries.byRegion('Africa')
byArea()Countryget countries by areaCountries.byArea(1002450)
areaBiggerThan()Listget countries Bigger than given areaCountries.areaBiggerThan(1002450)
areaSmallerThan()Listget countries Smaller than given areaCountries.areaSmallerThan(1002450)

Development

Want to contribute? Great 😄 .. all good contributions to this package are welcome

Credit

thanks for amatos for the json country data

Libraries

countries
countries_data
country
country_list
currency
currency_list
flag_string
flutter_country
translation
translation_list