intl_phone_number_field
0.2.1, released 2 years ago by flutterway.net
Customised Flutter TextFormField to input international phone numbers with country codes.
WASM-ready
What it does
Provides a customized text form field widget specifically designed for international phone number input. It includes a country code selector dialog, input masking, validation support, and customizable UI configurations.
AI-written summary of version 0.2.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need user registration or profile forms that require international phone numbers.
- You want built-in country code selection and phone number formatting.
Skip it when
- You only require basic standard text fields without phone formatting or country codes.
Strengths
- Includes customizable dialog and country code configurations.
- Supports custom JSON loading for country data.
- Provides built-in validation and masking options.
Weaknesses
- Limited documentation on advanced phone number parsing verification.
- Relies on specific third-party dependencies for formatting and flags.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 3
InternationalPhoneNumberInput(
onInputChanged: (phone) {
print(phone.number);
},
validator: (number) {
if (number.number.isEmpty) {
return "The phone number cannot be left empty";
}
return null;
},
)Alternatives
Packages that do the same job and could replace intl_phone_number_field.
- intl_phone_field
Alternative phone number input field package available in the catalog.
50Compare
Works with
Packages commonly used together with intl_phone_number_field: ones it builds on, ones built on it, and its own family.
- json_annotationintl_phone_number_field depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- country_flagsintl_phone_number_field depends on itDisplays country flags as SVG or emoji using ISO country, language, currency, or phone prefix codes
- flutter_multi_formatterintl_phone_number_field depends on itInput formatters for international phone numbers, credit/debit cards, currencies, and custom masks.