international_phone_field 0.0.2 copy "international_phone_field: ^0.0.2" to clipboard
international_phone_field: ^0.0.2 copied to clipboard

outdated

Validating numbers and providing necessary detail base on selected country

international_phone_field🌎 #

Validating numbers and providing necessary detail base on selected country😃. The pacakge comes with a enough detail about the country which is super useful and save you from api issues🐻

Simple project screenshot #

Usage #

import 'package:international_phone_field/international_phone_field.dart';

String phoneNumber;
String phoneIsoCode;

void onPhoneNumberChange(String number, String internationalizedPhoneNumber, String isoCode) {
    setState(() {
       phoneNumber = number;
       phoneIsoCode = isoCode;
    });
}

@override
 Widget build(BuildContext context) => Scaffold(
     body: Center(
       child: Padding(
              padding: const EdgeInsets.only(left: 8.0, right: 8.0),
              child: InternationalPhoneInput(
                onPhoneNumberChange: onPhoneNumberChange,
                initialPhoneNumber: phoneNumber,
                initialSelection: phoneIsoCode,
                enabledCountries: ['+233', '+234'],
                labelText: "Enter your phone Number",
                addCountryComponentInsideField: true,
                border: OutlineInputBorder(
                  gapPadding: 20.0,
                  borderRadius: BorderRadius.circular(10),
                ),
              ),
            ),
          ),
       );

12
likes
0
pub points
41%
popularity

Publisher

unverified uploader

Validating numbers and providing necessary detail base on selected country

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, libphonenumber

More

Packages that depend on international_phone_field