Skip to content
pubscout

dlibphonenumber

1.1.76, released 14 days ago by an unverified publisher

Parse, format, validate and extract international phone numbers in pure Dart.

WASM-readySingle maintainer
$ flutter pub add dlibphonenumber
Source repository

What it does

Provides a Dart API to parse raw phone strings into structured objects, format them in various standards, and validate their correctness. It also offers utilities like type detection, example generation, geocoding, carrier lookup, and as‑you‑type formatting.

AI-written summary of version 1.1.76, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need phone‑number handling without native platform code
  • Cross‑platform Flutter apps require consistent validation and formatting

Skip it when

  • You need deep integration with native telephony APIs
  • You require a full‑featured contact management solution

Strengths

  • Pure Dart implementation works on all Flutter platforms
  • Comprehensive feature set covering parsing, formatting, validation, and metadata
  • No native dependencies simplify builds

Weaknesses

  • Relies on bundled metadata which may become outdated between releases
  • Limited to phone‑number utilities; no broader validation library

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:dlibphonenumber/dlibphonenumber.dart';

final phoneUtil = PhoneNumberUtil.instance;
final number = phoneUtil.parse('0241234567', 'GH');
print(phoneUtil.format(number, PhoneNumberFormat.e164)); // +233241234567

Alternatives

Packages that do the same job and could replace dlibphonenumber.

  • phone_numbers_parser

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

  • fixed

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

  • validators2

    String validation and sanitization for Dart.

  • x509

    Dart library for parsing and working with X.509 certificates.

Works with

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