dialcodeselector

Creator: coderz1093

Last updated:

0 purchases

dialcodeselector Image
dialcodeselector Images

Languages

Categories

Add to Cart

Description:

dialcodeselector

dialcodeselector Package #
Package designed to select either country or country dial code
Screens #





pubspec.yaml #
dialcodeselector: <last version>
copied to clipboard
import #
import 'package:dialcodeselector/dialcodeselector.dart';
copied to clipboard
Simple example #
//Define your default country
Country? defaultCountry = DialCodeSelector.getCountryByDialCode(dialCode: "233");

//implement callback
void onCountrySelected(Country? country) {
defaultCountry = country;
setState(() {});
}

// Define theme for the country code picker
DialCodeSelectorTheme get selectorTheme =>
DialCodeSelectorTheme(titleColor: Colors.blueGrey);

void showCountryPicker()async{
await DialCodeSelector.selectCountry(BuildContext,
selectorTheme: selectorTheme,
initialShortName: defaultCountry?.countryShortName,
onCountrySelected: onCountrySelected);
}
copied to clipboard
Features #

Selecting a country dial code
Selecting a country
Returns selected Country name, logo, shortname and dial code
Get country by shortname
Get country by dialcode

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.