Dart Tel Input

A Dart widget for entering international telephone numbers with dropdown searching input countries

Getting Started

Add the following line in your pubspec file

tel_input:

Get the package by running the command

flutter packages get

Include the widget in your dart file

import 'package:tel_input/tel_input.dart';

Example Usage:

TelInput(
  dialCode: '+852',
  includeDialCode: true,
  onChange: (String phoneNumber) => print('phoneNumber: $phoneNumber'),
)

Features

Provision of an example format given the selected dial code

tel-input

List of selection of countries with corresponding dial codes

tel-input-dial-code-list

Filtering items

tel-input-searching

Parameters

ParameterTypeDescriptionExampleRequired?Default
dialCodeStringDial Code. See the list below.'+93'N'+852'
includeDialCodeboolif it is set to true, dial code and phone number will be returned in onChange methodtrueNfalse
onChangeFunctionFunction to get the value back(String phoneNumber) => print('phoneNumber: $phoneNumber')NN/A

Supported Countries

CountryISODial Code
Afghanistan (‫افغانستان‬‎)af+93
Albania (Shqipëri)al+355
Algeria (‫الجزائر‬‎)dz+213
American Samoaas+1684
Andorraad+376
Angolaao+244
Anguillaai+1264
Antigua and Barbudaag+1268
Argentinaar+54
Armenia (Հայաստան)am+374
Arubaaw+297
Australiaau+61
Austria (Österreich)at+43
Azerbaijan (Azərbaycan)az+994
Bahamasbs+1242
Bahrain (‫البحرين‬‎)bh+973
Bangladesh (বাংলাদেশ)bd+880
Barbadosbb+1246
Belarus (Беларусь)by+375
Belgium (België)be+32
Belizebz+501
Benin (Bénin)bj+229
Bermudabm+1441
Bhutan (འབྲུག)bt+975
Boliviabo+591
Bosnia and Herzegovina (Босна и Херцеговина)ba+387
Botswanabw+267
Brazil (Brasil)br+55
British Indian Ocean Territoryio+246
British Virgin Islandsvg+1284
Bruneibn+673
Bulgaria (България)bg+359
Burkina Fasobf+226
Burundi (Uburundi)bi+257
Cambodia (កម្ពុជា)kh+855
Cameroon (Cameroun)cm+237
Canadaca+1
Cape Verde (Kabu Verdi)cv+238
Caribbean Netherlandsbq+599
Cayman Islandsky+1345
Central African Republic (République centrafricaine)cf+236
Chad (Tchad)td+235
Chilecl+56
China (中国)cn+86
Christmas Islandcx+61
Cocos (Keeling) Islandscc+61
Colombiaco+57
Comoros (‫جزر القمر‬‎)km+269
Congo (DRC) (Jamhuri ya Kidemokrasia ya Kongo)cd+243
Congo (Republic) (Congo-Brazzaville)cg+242
Cook Islandsck+682
Costa Ricacr+506
Côte d’Ivoireci+225
Croatia (Hrvatska)hr+385
Cubacu+53
Curaçaocw+599
Cyprus (Κύπρος)cy+357
Czech Republic (Česká republika)cz+420
Denmark (Danmark)dk+45
Djiboutidj+253
Dominicadm+1767
Dominican Republic (República Dominicana)do+1
Ecuadorec+593
Egypt (‫مصر‬‎)eg+20
El Salvadorsv+503
Equatorial Guinea (Guinea Ecuatorial)gq+240
Eritreaer+291
Estonia (Eesti)ee+372
Ethiopiaet+251
Falkland Islands (Islas Malvinas)fk+500
Faroe Islands (Føroyar)fo+298
Fijifj+679
Finland (Suomi)fi+358
Francefr+33
French Guiana (Guyane française)gf+594
French Polynesia (Polynésie française)pf+689
Gabonga+241
Gambiagm+220
Georgia (საქართველო)ge+995
Germany (Deutschland)de+49
Ghana (Gaana)gh+233
Gibraltargi+350
Greece (Ελλάδα)gr+30
Greenland (Kalaallit Nunaat)gl+299
Grenadagd+1473
Guadeloupegp+590
Guamgu+1671
Guatemalagt+502
Guernseygg+44
Guinea (Guinée)gn+224
Guinea-Bissau (Guiné Bissau)gw+245
Guyanagy+592
Haitiht+509
Hondurashn+504
Hong Kong (香港)hk+852
Hungary (Magyarország)hu+36
Iceland (Ísland)is+354
India (भारत)in+91
Indonesiaid+62
Iran (‫ایران‬‎)ir+98
Iraq (‫العراق‬‎)iq+964
Irelandie+353
Isle of Manim+44
Israel (‫ישראל‬‎)il+972
Italy (Italia)it+39
Jamaicajm+1
Japan (日本)jp+81
Jerseyje+44
Jordan (‫الأردن‬‎)jo+962
Kazakhstan (Казахстан)kz+7
Kenyake+254
Kiribatiki+686
Kosovoxk+383
Kuwait (‫الكويت‬‎)kw+965
Kyrgyzstan (Кыргызстан)kg+996
Laos (ລາວ)la+856
Latvia (Latvija)lv+371
Lebanon (‫لبنان‬‎)lb+961
Lesothols+266
Liberialr+231
Libya (‫ليبيا‬‎)ly+218
Liechtensteinli+423
Lithuania (Lietuva)lt+370
Luxembourglu+352
Macau (澳門)mo+853
Macedonia (FYROM) (Македонија)mk+389
Madagascar (Madagasikara)mg+261
Malawimw+265
Malaysiamy+60
Maldivesmv+960
Maliml+223
Maltamt+356
Marshall Islandsmh+692
Martiniquemq+596
Mauritania (‫موريتانيا‬‎)mr+222
Mauritius (Moris)mu+230
Mayotteyt+262
Mexico (México)mx+52
Micronesiafm+691
Moldova (Republica Moldova)md+373
Monacomc+377
Mongolia (Монгол)mn+976
Montenegro (Crna Gora)me+382
Montserratms+1664
Morocco (‫المغرب‬‎)ma+212
Mozambique (Moçambique)mz+258
Myanmar (Burma) (မြန်မာ)mm+95
Namibia (Namibië)na+264
Naurunr+674
Nepal (नेपाल)np+977
Netherlands (Nederland)nl+31
New Caledonia (Nouvelle-Calédonie)nc+687
New Zealandnz+64
Nicaraguani+505
Niger (Nijar)ne+227
Nigeriang+234
Niuenu+683
Norfolk Islandnf+672
North Korea (조선 민주주의 인민 공화국)kp+850
Northern Mariana Islandsmp+1670
Norway (Norge)no+47
Oman (‫عُمان‬‎)om+968
Pakistan (‫پاکستان‬‎)pk+92
Palaupw+680
Palestine (‫فلسطين‬‎)ps+970
Panama (Panamá)pa+507
Papua New Guineapg+675
Paraguaypy+595
Peru (Perú)pe+51
Philippinesph+63
Poland (Polska)pl+48
Portugalpt+351
Puerto Ricopr+1
Qatar (‫قطر‬‎)qa+974
Réunion (La Réunion)re+262
Romania (România)ro+40
Russia (Россия)ru+7
Rwandarw+250
Saint Barthélemybl+590
Saint Helenash+290
Saint Kitts and Neviskn+1869
Saint Lucialc+1758
Saint Martin (Saint-Martin (partie française))mf+590
Saint Pierre and Miquelon (Saint-Pierre-et-Miquelon)pm+508
Saint Vincent and the Grenadinesvc+1784
Samoaws+685
San Marinosm+378
São Tomé and Príncipe (São Tomé e Príncipe)st+239
Saudi Arabia (‫المملكة العربية السعودية‬‎)sa+966
Senegal (Sénégal)sn+221
Serbia (Србија)rs+381
Seychellessc+248
Sierra Leonesl+232
Singaporesg+65
Sint Maartensx+1721
Slovakia (Slovensko)sk+421
Slovenia (Slovenija)si+386
Solomon Islandssb+677
Somalia (Soomaaliya)so+252
South Africaza+27
South Korea (대한민국)kr+82
South Sudan (‫جنوب السودان‬‎)ss+211
Spain (España)es+34
Sri Lanka (ශ්‍රී ලංකාව)lk+94
Sudan (‫السودان‬‎)sd+249
Surinamesr+597
Svalbard and Jan Mayensj+47
Swazilandsz+268
Sweden (Sverige)se+46
Switzerland (Schweiz)ch+41
Syria (‫سوريا‬‎)sy+963
Taiwan (台灣)tw+886
Tajikistantj+992
Tanzaniatz+255
Thailand (ไทย)th+66
Timor-Lestetl+670
Togotg+228
Tokelautk+690
Tongato+676
Trinidad and Tobagott+1868
Tunisia (‫تونس‬‎)tn+216
Turkey (Türkiye)tr+90
Turkmenistantm+993
Turks and Caicos Islandstc+1649
Tuvalutv+688
U.S. Virgin Islandsvi+1340
Ugandaug+256
Ukraine (Україна)ua+380
United Arab Emirates (‫الإمارات العربية المتحدة‬‎)ae+971
United Kingdomgb+44
United Statesus+1
Uruguayuy+598
Uzbekistan (Oʻzbekiston)uz+998
Vanuatuvu+678
Vatican City (Città del Vaticano)va+39
Venezuelave+58
Vietnam (Việt Nam)vn+84
Wallis and Futuna (Wallis-et-Futuna)wf+681
Western Sahara (‫الصحراء الغربية‬‎)eh+212
Yemen (‫اليمن‬‎)ye+967
Zambiazm+260
Zimbabwezw+263
Åland Islandsax+358

Libraries

tel_input