{"id":32299915,"url":"https://github.com/samitkapoor/country_phone_code_picker","last_synced_at":"2025-10-23T05:07:22.724Z","repository":{"id":57676790,"uuid":"488228135","full_name":"samitkapoor/country_phone_code_picker","owner":"samitkapoor","description":"A Dart package that provides a customizable country phone code picker for your Flutter application","archived":false,"fork":false,"pushed_at":"2023-02-25T19:43:22.000Z","size":174,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-22T23:32:44.110Z","etag":null,"topics":["country-codes","country-list","country-picker","dart","flutter","flutter-package","phone-code"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samitkapoor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-03T13:48:11.000Z","updated_at":"2024-08-10T16:49:05.000Z","dependencies_parsed_at":"2024-08-22T23:14:37.333Z","dependency_job_id":"44f77bbe-5f4d-4364-a6de-9be7879957dc","html_url":"https://github.com/samitkapoor/country_phone_code_picker","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":"0.21052631578947367","last_synced_commit":"04f6e2ba0795744933cf7c490255bd9aa0658b17"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samitkapoor/country_phone_code_picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samitkapoor%2Fcountry_phone_code_picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samitkapoor%2Fcountry_phone_code_picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samitkapoor%2Fcountry_phone_code_picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samitkapoor%2Fcountry_phone_code_picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samitkapoor","download_url":"https://codeload.github.com/samitkapoor/country_phone_code_picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samitkapoor%2Fcountry_phone_code_picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280563577,"owners_count":26351732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["country-codes","country-list","country-picker","dart","flutter","flutter-package","phone-code"],"created_at":"2025-10-23T05:07:18.627Z","updated_at":"2025-10-23T05:07:22.718Z","avatar_url":"https://github.com/samitkapoor.png","language":"Dart","readme":"\nA Flutter package that provides an easy and customizable country phone code picker widget!\u003cbr\u003e\u003cbr\u003e\n\n\u003cp\u003e\n  \u003cimg width=350 src=\"https://user-images.githubusercontent.com/77121931/168589664-e708d2ec-682d-4a30-af6b-303d9566ec16.gif\" /\u003e\n  \u003cimg width=350 src=\"https://user-images.githubusercontent.com/77121931/166982782-7c92aaa2-0acc-4aac-b1e2-2f65714b593e.png\" /\u003e\n\u003c/p\u003e\n\n## Features\n\nThis package comes with a lot of customization allowing you to build the widget as per your preferences with ease!\n\u003cbr\u003e\n\nParameters for CountryPhoneCodePicker Widget \n\u003cbr\u003e\n\n|All you can set parameters|What they mean|Default|\n|:-------------------------:|:------------:|:-----:|\n|countryController|You need to pass the instance of the countryController|No Default Value|\n|defaultCountryCode|Allows you to set a default/initially selected country|Afghanistan|\n|height|Height of the picker widget|45|\n|width|Width of the picker widget |80|\n|flagHeight|Height of the flag inside picker widget|35|\n|flagWidth|Width of the flag inside picker widget|50|\n|backgroundColor|Background color of picker widget|Colors.transparent|\n|borderRadius|Control the radius of the curve around the corners of border of the picker widget|15|\n|flagBorderRadius|Control the radius of the curve around the corners of flag image|5|\n|borderColor|Color of the border of picker widget|Colors.transparent|\n|borderWidth|Width of the border of picker widget|0|\n|contentPadding|Padding inside the picker widget|EdgeInsets.symmetric(horizontal:5, vertical:5)|\n|countryNameTextStyle|Style the font of country name inside picker widget|TextStyle(fontSize: 14, color: Colors.black)|\n|countryPhoneCodeTextStyle|Style the font of phone code inside the picker widget|TextStyle(color: Colors.black, fontSize: 14)|\n|showFlag|Flag is shown in the picker widget if value is true|true|\n|showName|Name is shown in the picker widget if value is true|false|\n|showPhoneCode|Phone Code is shown in the picker widget if value is true|false|\n|actionIcon|Picker Widget Icon|Icon(Icons.arrow_drop_down_rounded)|\n|searchSheetBackground|Background color of search bar sheet|Color(0xfffafafa)|\n|searchBarLeadingIcon|Back Button icon|Icon(Icons.arrow_back_outlined, color: Colors.black)|\n|searchBarHintText|Hint text of text field|null|\n|searchBarHintStyle|Style the hint text|TextStyle()|\n|searchBarLabelText|Label text of text field|null|\n|searchBarLabelStyle|Style the label text|TextStyle()|\n|searchBarHelperText|Helper text of text field|null|\n|searchBarHelperStyle|Style the helper text|TextStyle()|\n|searchBarPrefixText|Prefix text of text field|null|\n|searchBarPrefixStyle|Style the prefix text|TextStyle()|\n|searchBarPrefixIcon|Prefix icon of text field|Icon(Icons.search, color: Colors.black)|\n|searchBarContentPadding|Padding of the text field content|EdgeInsets.symmetric(horizontal: 10, vertical: 5)|\n|border|Border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|errorBorder|Error border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|focusedBorder|Focused border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|disabledBorder|Disabled border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|focusedErrorBorder|Focused error border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|enabledBorder|Enabled border of text field|OutlineInputBorder(borderSide: BorderSide.none)|\n|searchBarCursorColor|Color of cursor in text field|Colors.black|\n|searchBarCursorHeight|Height of cursor in text field|20|\n|searchBarCursorWidth|Width of cursor in text field|2|\n|style|Style the input inside text field|TextStyle()|\n|searchBarInitialValue|Initial query of text field|Empty string|\n|keyboardType|Type of input in text field|TextInputType.text|\n|showCursor|Cursor is visible if value is true|true|\n\n\u003cbr\u003e\n\nParameters for specific detail widget\n\n|All you can set parameters|What they mean|Default|\n|:-------------------------:|:------------:|:-----:|\n|height|Allows you to set height to the widget|0|\n|width|Allows you to set width to the widget|0|\n|padding|Padding inside the widget|EdgeInsets.zero|\n|borderRadius|Curve around the corners of the border of widget|0|\n|color|Color of the widget|Colors.transparent|\n|borderColor|Color of the border|Colors.black|\n|borderStyle|Style of the border|BorderStyle.solid|\n|borderWidth|Width of the border|0|\n|textStyle|Style the text inside widget|TextStyle(fontSize: 18)|\n\n\u003cbr\u003e\n\n## Getting started\n\n\nJust include this in your pubspec.yaml\u003cbr\u003e\n\n```dart\n  country_phone_code_picker: \u003cVERSION\u003e\n```\n\nor run this in your terminal\u003cbr\u003e\n\n```dart\n  flutter pub add country_phone_code_picker\n```\n\n\u003cbr\u003e\n\n## Usage\n\nBefore starting the use of Country Code Picket widgets, you need to initialize the CountryController.\nUse the below function to initialize the CountryController \n```dart\ninitializeCountryController();\n```\nMake sure you initialize the CountryController before using  the widgets. A safe place to initialize would be just outside the MaterialApp!\n\nYou can access the instance of the CountryController like this\n```dart\nCountryController countryController = getCountryController();\n```\n\nTo simply get a Country Picker widget, try:\n\n```dart\nCountryPhoneCodePicker.withDefaultSelectedCountry(\n  countryController: countryController,\n  defaultCountryCode:\n  Country(name: 'India', countryCode: 'IN', phoneCode: '+91'),\n  borderRadius: 5,\n  borderWidth: 1,\n  borderColor: Colors.grey,\n  style: const TextStyle(fontSize: 16),\n  searchBarHintText: 'Search by name',\n),\n```\n\nTo display a specific property about the country for example - country code, phone code, name, flag\n\n```dart\nCountryPhoneCodeWidget(\n  height: 30,\n  width: 50,\n  textStyle: const TextStyle(fontSize: 15),\n  borderWidth: 1,\n  borderRadius: 5,\n  borderColor: Colors.black,\n),\n```\n\nTo fetch details about the selected country, try:\n\n```dart\nCountryController countryController = getCountryController(); //Get the instance of the controller\nprint(countryController.selectedCountry);\nprint(countryController.selectedCountryCode);\n```\n\n## Additional information\n\n \n Hop on to :- [samitkapoor/country_phone_code_picker](https://github.com/samitkapoor/country_phone_code_picker) \n to find more information, contribute, file issues regarding the package!\n \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamitkapoor%2Fcountry_phone_code_picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamitkapoor%2Fcountry_phone_code_picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamitkapoor%2Fcountry_phone_code_picker/lists"}