flutter_country_code_picker

Last updated:

0 purchases

flutter_country_code_picker Image
flutter_country_code_picker Images
Add to Cart

Description:

flutter country code picker

Flutter Country Code Picker #
A flutter package to select a country from a list of countries.
It works on Android, iOS, macOS, linux, windows and web
Getting Started #
Add the package to your pubspec.yaml:
flutter pub add flutter_contry_code_picker
in your dart file, import the library
import 'package:flutter_country_code_picker/flutter_country_code_picker.dart';
copied to clipboard
Show country code picker using IntlPhoneField :
example #
The country code widget load the country code with flags
import 'package:flutter/material.dart';
import 'package:flutter_country_code_picker/flutter_country_code_picker.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
const MyApp({super.key});

@override
Widget build(BuildContext context) {
var number = "";
return MaterialApp(
home: Scaffold(
body: Column(
children: [
// Picker name
Text("Flutter Country Code Picker"),

//Picker Widget
IntlPhoneField(
maxLength: 10,
controller: controller,
initialCountryCode: "IN",
validator: (data) {
return null;
},
onChanged: (data) {
number = data;
print("number is $data");
}
)

//Entered Data
Text("Entered Number is $number")

],
),
),
);
}
}
copied to clipboard
example ScreenShots #
This example shows how to take full control over the picker by providing your own build`.
gif #

images #




Flutter pub add #
add the package with flutter pub add flutter_contry_code_picker

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.