सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक डार्ट पैकेज जो Google के libphonenumber लाइब्रेरी का उपयोग करके अंतरराष्ट्रीय फ़ोन नंबर प्रबंधन की अनुमति देता है। यह विश्वव्यापी प्रारूपों में फ़ोन नंबरों के विश्लेषण, प्रमाणीकरण, प्रारूपण और क्षेत्र निर्धारण के लिए विश्वसनीय कार्यक्षमता प्रदान करता है। विभिन्न क्षेत्रों में सटीक फ़ोन नंबर प्रसंस्करण की आवश्यकता वाले ऐप्स के लिए आदर्श, यह मोबाइल, वेब और डेस्कटॉप सहित सभी प्रमुख प्लेटफॉर्म का समर्थन करता है। पैकेज उपयोगकर्ता इनपुट प्रमाणीकरण और प्रदर्शन में सुसंगतता और सहीता सुनिश्चित करता है, अंतरराष्ट्रीय संचार कार्यप्रवाह में त्रुटियों को कम करता है।
उपयोग
अंतरराष्ट्रीय फोन नंबर की पुष्टि करें
क्षेत्र के अनुसार फ़ोन नंबर को प्रारूपित करें
फ़ोन नंबर मेटाडेटा का विश्लेषण
एक संख्या से देश का पता लगाना
बहु-क्षेत्र उपयोगकर्ता इनपुट का समर्थन करना
मुख्य विशेषताएँ
Google के libphonenumber पर आधारित
क्रॉस-प्लेटफ़ॉर्म समर्थन
व्यापक वैधता
क्षेत्र-विशिष्ट प्रारूपण
स्वचालित संख्या प्रकार निर्धारण
इनके लिए उपयुक्त
उपयोगकर्ता पंजीकरण के साथ वैश्विक एप्लिकेशन
टेलीकॉम या संदेश ऐप
अंतर्राष्ट्रीय फॉर्म इनपुट
सटीक संख्या विश्लेषण की आवश्यकता वाले ऐप्स
विश्वसनीय फ़ोन नंबर तर्क की आवश्यकता वाले विकासकर्ता
विचार योग्य बातें
क्षेत्र कोड के साथ सावधानीपूर्वक निपटना आवश्यक है
एप्लिकेशन के आकार में हल्का वृद्धि हो सकती है
पूर्ण कार्यक्षमता के लिए मूल कोड पर निर्भर है
libphonenumber द्वारा समर्थित देशों तक सीमित
अमान्य इनपुट के लिए उचित त्रुटि संहार की आवश्यकता है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Dart LibPhoneNumber
A Dart package for working with international phone numbers based on Google's libphonenumber implementation. It parses, formats, and validates numbers without relying on native dependencies.
✨ Features
✅ Parse, format, and validate phone numbers [parse(), format(), isValidNumber()]
➝ Convert raw phone numbers into structured objects, apply different formats, and check validity.
✅ Identify phone number types [getNumberType()]
➝ Distinguishes between Fixed-line, Mobile, Toll-free, Premium Rate, VoIP, etc.
✅ Match and compare phone numbers [isNumberMatch()]
➝ Determines whether two numbers are the same or similar.
✅ Generate example phone numbers [getExampleNumber()]
➝ Provides valid phone number examples for various countries/regions.
✅ Perform quick validation [isPossibleNumber()]
➝ Checks if a number has a valid length without requiring region-specific details.
✅ Validate phone numbers for a specific region [isValidNumberForRegion()]
➝ Ensures a phone number is valid in the given country based on length and prefix rules.
✅ Format phone numbers as-you-type [getAsYouTypeFormatter()]
➝ Dynamically formats phone numbers as users enter each digit.
✅ Extract phone numbers from text [findNumbers()]
➝ Detects phone numbers within a block of text (e.g., 'Call me on 0241234567').
✅ Geocode phone numbers [getDescriptionForNumber()]
➝ Retrieves geographical information related to a phone number (e.g., 'Zurich' for a Swiss number).
✅ Retrieve carrier information [getNameForNumber()]
➝ Identifies the telecom provider associated with a number (e.g., 'AT&T', 'Vodafone').
✅ Find associated timezones [getTimeZonesForNumber()]
➝ Returns timezone(s) linked to a phone number (e.g., 'America/New_York').
🚀 Quick Start
📌 Installation
Add dlibphonenumber to your pubspec.yaml:
dependencies:dlibphonenumber:^1.1.35#replace with the current version number.