https://github.com/rexthecoder/international_phone_field
Validating numbers and providing necessary detail base on selected country
https://github.com/rexthecoder/international_phone_field
dart flutter flutterpackage
Last synced: about 2 months ago
JSON representation
Validating numbers and providing necessary detail base on selected country
- Host: GitHub
- URL: https://github.com/rexthecoder/international_phone_field
- Owner: rexthecoder
- License: mit
- Created: 2020-11-17T17:19:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-19T09:33:13.000Z (over 5 years ago)
- Last Synced: 2025-10-23T01:49:46.386Z (4 months ago)
- Topics: dart, flutter, flutterpackage
- Language: Dart
- Homepage: https://pub.dev/packages/international_phone_field/versions/0.1.0
- Size: 384 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# international_phone_field🌎
Validating numbers and providing necessary detail base on selected country😃. The pacakge comes with enough detail about the country which is super useful and save you from api issues🐻
## Simple project screenshot

## Usage
```dart
import 'package:international_phone_field/international_phone_field.dart';
String phoneNumber;
String phoneIsoCode;
void onPhoneNumberChange(
String number,
String internationalizedPhoneNumber,
String isoCode,
String dialCode,
String countryCapital,
String countryContinent,
String countryCurrency,
String countryName) {
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: InterField(
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),
),
),
),
),
);
```