beuni_country_picker

Last updated:

0 purchases

beuni_country_picker Image
beuni_country_picker Images
Add to Cart

Description:

beuni country picker

Beuni_country_picker #
A flutter package to select Country code from New Screen, BottomSheet and Dialog box.
Features #
In this package we are showing countries with Country code, Country Name and also showing flags also
in sorted list. Here user can search and filter out country and select country.



Getting started #
Add package to your pubspec.yaml file:
beuni_country_picker: 0.0.4
copied to clipboard
Usage #
Usage in BottomSheet:-
void bottomSheet() {
showModalBottomSheet(
context: context,
enableDrag: true,
builder: (BuildContext context) {
return BeuniCountryPicker(
countryList: [],
onCountryClick: (Country country) {
print(country.name);
Navigator.of(context).pop();
});
},
);
}
copied to clipboard
Usage in Dialog
void showDialog1() {
showDialog(
context: context,
builder: (BuildContext context) {
return Dialog(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(20.0)),
child: BeuniCountryPicker(
searchText: "Search Here",
isSearchVisible: false,
countryList: [],
onCountryClick: (Country country) {
print(country.name);
Navigator.of(context).pop();
}),
);
},
);
}
copied to clipboard
Parameters: #

'countryList':- Need to pass country list if you have your country list otherwise pass []. (
required)
'onCountryClick':- This is called on user Click on country
'searchText':- In this need to pass String to set hint in Search field.
'isSearchVisible':- Default this is true for showing Search TextField, make it false to hide
Search TextField

BeuniCountryPicker(
searchText: "Search Here",
isSearchVisible: false,
countryList: [ ],
onCountryClick: (Country country) {
print(country.name);
});
copied to clipboard
If you want add your add your own country list you can also do it:-
import 'package:beuni_country_picker/src/model/country.dart';
copied to clipboard
Add country value like below, Here one more thing you can add flag emoji or network url for image

Country country = Country(
dialCode: "+91",
flag: "https://flagcdn.com/32x24/in.png",
code: "IN",
name: "India"
);
copied to clipboard
Note:- SVG image url is not supported yet
Contributions #
Contributions of any kind are more than welcome! Feel free to fork and improve country_code_picker
in any way you want, make a pull request, or open an issue.

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.