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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user