phone_numbers_parser
9.0.29, released 3 weeks ago by an unverified publisher
Dart library for parsing, validating, and formatting international phone numbers.
What it does
Parses phone numbers using Google's libPhoneNumber metadata across all platforms instantly without native method channels. It allows validating numbers by type, formatting them per country, finding phone numbers inside text, and managing phone number ranges.
AI-written summary of version 9.0.29, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to validate user-entered phone numbers against specific country rules.
- You want to format national or international phone numbers correctly.
- You need to extract phone numbers from arbitrary text blocks.
Skip it when
- You require complex carrier routing or interactive telephony dialing features.
Strengths
- Supports all platforms instantly without requiring native platform channels.
- Uses up-to-date metadata from Google's libPhoneNumber project.
- Provides helper utilities like phone number ranges and text extraction.
Weaknesses
- Metadata must be periodically upgraded to include recent numbering plan changes.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Not documented
import 'package:phone_numbers_parser/phone_numbers_parser.dart';
void main() {
final frPhone = PhoneNumber.parse('+33 655 5705 76');
final isValid = frPhone.isValid();
print('Valid: $isValid');
}Alternatives
Packages that do the same job and could replace phone_numbers_parser.
- dlibphonenumber
Parse, format, validate and extract international phone numbers in pure Dart.
77Compare - fixed
Fixed decimal numbers with a fixed scale, stored as BigInts, supporting math, formatting and parsing.
79Compare - math_expressions
Parse and evaluate mathematical expressions in real, vector, and interval contexts.
79Compare - safe_text
Fast Dart profanity and swear word filter with phone number detection for 80+ languages.
78Compare
Works with
Packages commonly used together with phone_numbers_parser: ones it builds on, ones built on it, and its own family.
- phone_form_fieldBuilt on phone_numbers_parserFlutter phone input FormField with internationalization, validation, and country selector.
- amplify_authenticatorBuilt on phone_numbers_parserPrebuilt, customizable sign‑in/sign‑up UI for Amplify Auth in Flutter.
- form_builder_phone_fieldBuilt on phone_numbers_parserInternational phone number input field for the flutter_form_builder package.
- flutter_loginBuilt on phone_numbers_parserA ready-made login and signup widget with animated effects.