Merge pull request #40 from ranganaperera/get_initial_date_values

Exposed method to get the country information of the initial selection
This commit is contained in:
Salvatore Giordano
2019-12-09 23:09:39 +01:00
committed by GitHub
2 changed files with 19 additions and 4 deletions

View File

@@ -26,10 +26,13 @@ class _MyAppState extends State<MyApp> {
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
CountryCodePicker(
onChanged: print,
// Initial selection and favorite can be one of code ('IT') OR dial_code('+39')
initialSelection: 'IT',
favorite: ['+39', 'FR']),
onChanged: print,
// Initial selection and favorite can be one of code ('IT') OR dial_code('+39')
initialSelection: 'IT',
favorite: ['+39', 'FR'],
//Get the country information relevant to the initial selection
getInitialData: (code) => print("${code.name} ${code.dialCode}"),
),
SizedBox(
width: 400,
height: 60,