From 95f5673a50fd5d94eaf268d2c56f5b9fe238dd34 Mon Sep 17 00:00:00 2001 From: Daniel Ioannou Date: Sat, 22 Aug 2020 23:26:05 +0300 Subject: [PATCH] Update README.md --- README.md | 4 +++- example/lib/main.dart | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c44afa..de1e351 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A flutter package to select a country from a list of countries. Add the package to your pubspec.yaml: ```yaml - country_picker: ^1.0.2 + country_picker: ^1.0.3 ``` In your dart file, import the library: @@ -21,6 +21,7 @@ A flutter package to select a country from a list of countries. ```Dart showCountryPicker( context: context, + showPhoneCode: true, // optional. Shows phone code before the country name. onSelect: (Country country) { print('Select country: ${country.displayName}'); }, @@ -29,6 +30,7 @@ showCountryPicker( ### Parameters: * `onSelect`: Called when a country is select. The country picker passes the new value to the callback (required) +* `showPhoneCode`: Can be used to to show phone code before the country name. * `exclude`: Can be used to exclude(remove) one ore more country from the countries list (optional). ```Dart showCountryPicker( diff --git a/example/lib/main.dart b/example/lib/main.dart index 4a1cfd0..bb8aed2 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -31,7 +31,9 @@ class HomePage extends StatelessWidget { onPressed: () { showCountryPicker( context: context, + //Optional. Can be used to exclude(remove) one ore more country from the countries list (optional). exclude: ['KN', 'MF'], + //Optional. Shows phone code before the country name. showPhoneCode: true, onSelect: (Country country) { print('Select country: ${country.displayName}');