validate_phone_number 1.1.0 copy "validate_phone_number: ^1.1.0" to clipboard
validate_phone_number: ^1.1.0 copied to clipboard

A new Flutter package for validate phone number based on country code.

Features #

It is a simple textformfield with inbuilt country code picker that allows us to validate the mobile number length based on country code. We can customize it as we need.

Getting started #

To use this package:

Run this command:

flutter pub add validate_phone_number

Or, add the following to your pubspec.yaml file:

dependencies:
validate_phone_number: ^1.1.0

Usage #

Import it Now in your Dart code, you can use:

import 'package:validate_phone_number/validate_phone_number.dart';

How to Use Simply call ValidatePhoneNumber class, and pass the required params:

ValidatePhoneNumber(
                controller: controller,
                onCountrySelected: (phoneCode, countryCode) {
                print('$phoneCode   $countryCode');
              },);
2
likes
125
points
66
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter package for validate phone number based on country code.

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on validate_phone_number