dlibphonenumber
1.1.76, released 14 days ago by an unverified publisher
Parse, format, validate and extract international phone numbers in pure Dart.
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)); // +233241234567Alternatives
Packages that do the same job and could replace dlibphonenumber.
- phone_numbers_parser
Dart library for parsing, validating, and formatting international phone numbers.
87Compare - fixed
Fixed decimal numbers with a fixed scale, stored as BigInts, supporting math, formatting and parsing.
79Compare - validators2
String validation and sanitization for Dart.
83Compare - x509
Dart library for parsing and working with X.509 certificates.
50Compare
Works with
Packages commonly used together with dlibphonenumber: ones it builds on, ones built on it, and its own family.
- fixnumdlibphonenumber depends on itProvides 32‑ and 64‑bit signed fixed‑width integer types for Dart.
- protobufdlibphonenumber depends on itProvides runtime support for Dart protocol buffer messages generated by protoc_plugin.
- intl_phone_number_inputBuilt on dlibphonenumberA Flutter widget for inputting international phone numbers with country code selectors.