From a94a13bd4732662bc3661cb80e7cd81edadf98f5 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 7 Apr 2020 15:12:04 +0200 Subject: [PATCH] bump version --- CHANGELOG.md | 2 +- lib/country_code_picker.dart | 4 ++++ pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5363a97..04e94f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.3.10 +## 1.3.11 - Fix initialization diff --git a/lib/country_code_picker.dart b/lib/country_code_picker.dart index c2cdea9..f6edfdb 100644 --- a/lib/country_code_picker.dart +++ b/lib/country_code_picker.dart @@ -185,12 +185,14 @@ class CountryCodePickerState extends State { } else { selectedItem = elements[0]; } + _onInit(selectedItem); } } @override void initState() { super.initState(); + if (widget.initialSelection != null) { selectedItem = elements.firstWhere( (e) => @@ -202,6 +204,8 @@ class CountryCodePickerState extends State { selectedItem = elements[0]; } + _onInit(selectedItem); + favoriteElements = elements .where((e) => widget.favorite.firstWhere( diff --git a/pubspec.yaml b/pubspec.yaml index e280389..a054a14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: country_code_picker description: A flutter package for showing a country code selector. In addition it gives the possibility to select a list of favorites countries, as well as to search using a simple searchbox -version: 1.3.10 +version: 1.3.11 homepage: https://github.com/imtoori/CountryCodePicker environment: