flutter_country 0.0.3
flutter_country: ^0.0.3 copied to clipboard

Dart native js
Flutter Android iOS web

A lite flutter package for providing world Country Data without internet connection ,, useful for country or language selector

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.0.3

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
officialNameStringArab Republic of Egypt
nativeNameTranslationListجمهورية مصر العربية
translationsTranslationListTranslationList(translations:List
demonymsDemonymListTranslationList(translations:List
altSpellingsList[ "EG" , "Arab Republic of Egypt" ]
alpha2CodeStringEG
alpha3CodeStringEGY
numericCodeString818
olympicCodeStringEGY
independentbooltrue
unMemberbooltrue
landLockedbool
topLevelDomainList.eg
capitalStringCairo
regionStringAfrica
subRegionStringNorthern Africa
currneciesCurrencyListCurrencyList(currencies:List
languagesMap<String, dynamic>{ 'eng' : 'English' , 'ara' : 'Arabic ' }
bordersList["LBY","PSE","SDN"]
area [in km]double1002450
flagString🇪🇬
phoneCodeList+20
coordinates [latitiude,longitude]List[27,30]
latitiudedouble27
longitudedouble30

Metods #

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')
byOlympicCode()Countryget country by olympic code
byPhoneCode()Countryget country by phone codeCountries.byPhoneCode('+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()
independent()Listget all independent countriesCountries.independent()
byRegion()Listget countries by regionCountries.byRegion('Africa')
bySubRegion()Listget countries by sub regionCountries.bySubRegion('Southern Europe')
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 mledoze/countries for the json country data

20
likes
90
pub points
41%
popularity

A lite flutter package for providing world Country Data without internet connection ,, useful for country or language selector

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ahmed.os.attya@gmail.com

License

Apache 2.0 (LICENSE)

More

Packages that depend on flutter_country