पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीWahidNasri/extended_phone_number_input

extended_phone_number_input

मान्यता, संपर्क चयनकर्ता और देश कोड के समर्थन के साथ फ़्लटर फ़ोन नंबर विजेट

extended_phone_number_input प्रोजेक्ट कवर
स्टार
9
फ़ोर्क
18
अंतिम पुश (UTC)
30 मार्च 2022
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

A Highly customizable Phone input Flutter widget that supports country code, validation and contact picker.

Features

  • Phone number with international validation
  • Include only specific countries
  • Exclude specific countries
  • Set a phone number using a controller (Selected country will be updated automatically)
  • Pick a phone number from contacts list

Getting started

Install the package extended_phone_number_input:

flutter pub add extended_phone_number_input

If you target Android 11+ (API 30+) and want to use the build-in contact picker you need to add the android.permission.READ_CONTACTS permission on the AndroidManifest.xml as this permission will be requested automatically.

Usage

A full and rich example can be found in /example folder.

Simple usage
 PhoneNumberInput(initialCountry: 'SA', locale: 'ar')
Show countries as dialog (default is bottom sheet)
 const PhoneNumberInput(
    initialCountry: 'US',
    locale: 'en',
    countryListMode: CountryListMode.dialog,
    contactsPickerPosition: ContactsPickerPosition.suffix,
    )
Custom borders
 PhoneNumberInput(
    initialCountry: 'TN',
    locale: 'fr',
    countryListMode: CountryListMode.dialog,
    contactsPickerPosition: ContactsPickerPosition.suffix,
    enabledBorder: OutlineInputBorder(
    borderRadius: BorderRadius.circular(10),
    borderSide: const BorderSide(color: Colors.purple)),
    focusedBorder: OutlineInputBorder(
        borderRadius: BorderRadius.circular(10),
        borderSide: const BorderSide(color: Colors.purple))
    )
Select Phone number programmatically

To be able to select a phone number programmatically, we first need to define a PhoneInputController :

PhoneInputController _controller = PhoneInputController(context);
 PhoneNumberInput(
     controller: _controller
    ...

Select the desired phone number:

_controller.phoneNumber = '+1-....'
Note:

If you want to set the phone number from contact, The widget already support this feature without the need to use the controller.

WahidNasri GitHub avatar
GitHub लेखक

WahidNasri ↗

भाषाएँDartHTMLRubySwiftKotlinObjective-C

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 5 आइटम

  • flutter{"sdk":"flutter"}
  • fluttercontactpicker^4.6.0
  • phone_numbers_parser^4.2.1
  • flutter_testडेवलपमेंट{"sdk":"flutter"}
  • flutter_lintsडेवलपमेंट^1.0.0

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗