Skip to content
pubscout

phone_numbers_parser

9.0.29, released 3 weeks ago by an unverified publisher

Dart library for parsing, validating, and formatting international phone numbers.

WASM-readyRock solid
$ flutter pub add phone_numbers_parser
Source repository

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.

  • fixed

    Fixed decimal numbers with a fixed scale, stored as BigInts, supporting math, formatting and parsing.

  • math_expressions

    Parse and evaluate mathematical expressions in real, vector, and interval contexts.

  • safe_text

    Fast Dart profanity and swear word filter with phone number detection for 80+ languages.

Works with

Packages commonly used together with phone_numbers_parser: ones it builds on, ones built on it, and its own family.