CountryCodePickerPlus 是一個 Flutter 套件,旨在簡化電話號碼的收集並實現精確的國家代碼選擇。它提供了一個直觀且可自訂的選取介面,支援 Android、iOS、Web、macOS、Windows 和 Linux 等多個平台。該套件透過提供可搜尋的國家清單、自動顯示國旗以及無縫整合至表單中,提升使用者體驗。它透過處理國家代碼的格式化與驗證,簡化了國際號碼輸入。
適用情境
國際電話號碼輸入
使用者註冊帶國家代碼
多區域表單支援
電信應用功能
聯絡表單增強功能
主要特色
可搜尋的國家清單
國家旗幟圖示
自動國家代碼檢測
可自訂的 UI
跨平台相容性
與文字欄位的輕鬆整合
適合對象
全域應用
使用者引導流程
訊息或通話應用
電商平台
旅行或物流服務
使用建議
需要互聯網以取得完整的國家資料
可能需要針對特定地區的偏好進行客製化
僅限國家代碼功能(無完整電話號碼驗證)
未針對非常大的國家列表進行優化
依賴外部資料來源取得國家元資料
原始 README
以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。
country_code_picker_plus
A Flutter package that provides an easy-to-use widget for picking country codes. This widget
supports various customization options including displaying country flags, searching countries, and
presenting the picker in different modes such as dialog, dropdown, and bottom sheet.
Description
country_code_picker_plus is a Flutter package designed to simplify the process of selecting
country codes in your mobile application. This package provides extensive customization options,
allowing developers to tailor the picker to their specific needs. Whether you want to show country
flags, search for countries, or present the picker in different styles, country_code_picker_plus
has you covered.
Sample Code
Here is a basic example demonstrating how to use the country_code_picker_plus package with various
customization options:
This widget allows users to enter a phone number with a country code. It validates the phone number
according to the country code and formats the phone number.
Features
Validate Phone Number: Validates the phone number according to the country code.
Format Phone Number: Automatically formats the phone number.
This section describes the PhoneInputField widget with its features and provides a sample code
snippet on how to use it.
📱 Supported Platforms
Mobile Application
Desktop Application
Web Application
Contributions
Contributions of any kind are more than welcome! Feel free to fork and improve
country_code_picker_plus
in any way you want, make a pull request, or open an issue.
This project follows the all-contributors specification. Contributions of any kind welcome!
Getting Involved
First of all, thank you for considering to get involved. You are a real superstar ⭐ and we ❤️ you!
Reporting Bugs and Issues
Use the configured Github issue report template when reporting an issue. Make sure to clearly state your observations and expectations so we can understand your needs and troubleshoot effectively.
Discussions and Ideas
We're happy to discuss and talk about ideas. Post your questions on StackOverflow.