From 0d60cf16e76d89464f804600c7e8440305145df5 Mon Sep 17 00:00:00 2001 From: Jerry Hanks Date: Sun, 16 Sep 2018 11:46:36 +0100 Subject: [PATCH] refactor : expand on the type of functions for CountryPicker onChange prop. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 8f84744..2d3567e 100644 --- a/README.md +++ b/README.md @@ -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.