country_info_picker

Creator: coderz1093

Last updated:

0 purchases

country_info_picker Image
country_info_picker Images

Languages

Categories

Add to Cart

Description:

country info picker

Country Info Picker #

A Flutter package to select a country from a list, with features like country name, flag, dial code, code, nationality, and the maximum length of a phone number.

Features #

Show country flag.
Show country dial code.
Show country code.
Show country
Show Nationality
Show the maximum length of a phone number.
Select a country from a list.
Get the selected country information.

Getting Started #
Add the package to your pubspec.yaml:
country_info_picker: ^0.0.1
copied to clipboard
Import the package in your file:
import 'package:country_info_picker/country_info_picker.dart';
copied to clipboard
Use the CountryInfoPicker widget:
CountryInfoPicker(
onChanged: (CountryInfoModel country) {
print('Select country: ${country.toLongString()}');
},
);
copied to clipboard
Example #
import 'package:country_info_picker/country_info_picker.dart';
import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('Country Info Picker Example'),
),
body: Center(
child: CountryInfoPicker(
onChanged: (CountryInfoModel country) {
print('Select country: ${country.toLongString()}');
},
),
),
),
);
}
}
copied to clipboard
Parameters #

onChanged: A callback function that is called when a country is selected.
selectedCountry: The default selected country.
showFlag: Whether to show the flag of the country.
showDialCode: Whether to show the dial code of the country.
showCode: Whether to show the code of the country.

Contributions #
Contributions of any kind are more than welcome! Feel free to fork and improve country_info_picker in any way you want, make a pull request, or open an issue.
License #
This project is licensed under the MIT License - see the LICENSE file for details.

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.