refactor : expand on the type of functions for CountryPicker onChange prop.

This commit is contained in:
Jerry Hanks
2018-09-16 11:46:36 +01:00
parent da0257f9c0
commit 0d60cf16e7

View File

@@ -25,6 +25,23 @@ Just put the component in your application setting the onChanged callback.
));
```
> Note: Your onChnaged function can be any function of the type shown below:
```dart
(CElement)->dynamic
```
> Example:
```dart
void _onCountryChange(CElement cElement) {
//Todo : manipulate the selected country code here
print("New Country selected: " + cElement.toString());
}
```
## 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.