Skip to content

Commit

Permalink
V2.0.16
Browse files Browse the repository at this point in the history
Merge pull request #86 from Daniel-Ioannou/v2.0.16
close #85
  • Loading branch information
Daniel-Ioannou authored Aug 24, 2022
2 parents a55350c + 87a395a commit ba3f676
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 52 deletions.
96 changes: 46 additions & 50 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## [2.0.15] - 02 May 2022
## 2.0.16
* Add support for Latvian localization
* Add support for Lithuanian localization

## 2.0.15
* Add support for German localization
* Add `favorite` option.
- Can be used to to show the favorite countries at the top of the list.
Expand All @@ -15,10 +19,10 @@
* Implemented Country Service
* Fix package assets
## [2.0.14] - 11 Apr 2022
## 2.0.14
* Add support for country search by phone code
## [2.0.13] - 05 Apr 2022
## 2.0.13
* Add getter for flag emoji in `Country` model
* Add option for bottom sheet height.
```Dart
Expand All @@ -30,10 +34,10 @@
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```
## [2.0.12] - 28 Feb 2022
## 2.0.12
* Update example android gradle
* Fix Kurdish translation for Curaçao name
## [2.0.11] - 01 Feb 2022
## 2.0.11
* Fix Eswatini name
* Fix Italy code at Turkish localization
* Add optional argument for showing "World Wide" option at the beginning of the list
Expand All @@ -45,14 +49,14 @@
);
```
## [2.0.10] - 19 Jan 2022
## 2.0.10
* Add support for French localization
* Add support for Kurdish localization
## [2.0.9] - 22 Nov 2021
## 2.0.9
* Add support for Estonian localization
## [2.0.8] - 13 Sep 2021
## 2.0.8
* Add support for Arabic localization
* Add support for Croatian localization
* Add options to autofocus at search TextField.
Expand All @@ -64,13 +68,13 @@
);
```
## [2.0.7] - 28 Jul 2021
## 2.0.7
* Add support for Turkish localization
## [2.0.6] - 02 Jul 2021
## 2.0.6
* Add support for Nepali and Hindi localization
## [2.0.5] - 31 May 2021
## 2.0.5
* Add styling options for the border-radius and the search field.
```Dart
showCountryPicker(
Expand All @@ -97,17 +101,17 @@
);
```
## [2.0.4] - 12 Apr 2021
## 2.0.4
* Add `CountryParser`
## [2.0.3] - 30 Mar 2021
## 2.0.3
* Add Ukrainian, Russian, and Polish translations
* Add `onClosed` callback
## [2.0.2] - 23 Mar 2021
## 2.0.2
* Add support for Norwegian localization
## [2.0.1] - 15 Mar 2021
## 2.0.1
* Implemented country list theme
```Dart
showCountryPicker(
Expand All @@ -120,18 +124,17 @@
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```
## [2.0.0] - 09 Mar 2021
## 2.0.0
* Migrated to null safety
## [1.1.4] - 18 Feb 2021
## 1.1.4
* Add support for Spanish and Portuguese localization.
* If `showPhoneCode` is false remove duplicates country
## [1.1.3] - 10 Dec 2020
## 1.1.3
* Localize label and hint of search text field
## [1.1.2] - 11 Oct 2020
## 1.1.2
* Add support for Greek localization.
* At search change contains to startsWith.
* Add country filter option.
Expand All @@ -146,11 +149,10 @@
);
```
## [1.1.1] - 24 Sep 2020
* Search on localizations.
## 1.1.1
* Search on localizations.
## [1.1.0] - 19 Sep 2020
## 1.1.0
### Implement localization.
Add the `CountryLocalizations.delegate` in the list of your app delegates.
Expand All @@ -174,34 +176,28 @@ MaterialApp(
* Simplified Chinese
* Traditional Chinese

## [1.0.5] - 31 Aug 2020

* Update documentation.

## [1.0.4] - 27 Aug 2020
## 1.0.5
* Update documentation.

* Implement search.
## 1.0.4
* Implement search.

## [1.0.3] - 22 Aug 2020
## 1.0.3
* Add show phone code option.

* Add show phone code option.

## [1.0.2] - 18 Aug 2020

* Add exclude countries option.
Can be used to exclude(remove) one ore more country from the countries list
```Dart
showCountryPicker(
context: context,
exclude: <String>['KN', 'MF'], //It takes a list of country code(iso2).
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```

## [1.0.1] - 12 Aug 2020

* Add documentation.
## 1.0.2
* Add exclude countries option.
Can be used to exclude(remove) one ore more country from the countries list
```Dart
showCountryPicker(
context: context,
exclude: <String>['KN', 'MF'], //It takes a list of country code(iso2).
onSelect: (Country country) => print('Select country: ${country.displayName}'),
);
```
## [1.0.0] - 11 Aug 2020
## 1.0.1
* Add documentation.
* Initial developers preview release.
## 1.0.0
* Initial developers preview release.
2 changes: 1 addition & 1 deletion example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A flutter package to select a country from a list of countries.
Add the package to your pubspec.yaml:

```yaml
country_picker: ^2.0.15
country_picker: ^2.0.16
```
In your dart file, import the library:
Expand Down
5 changes: 5 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class MyApp extends StatelessWidget {
const Locale('en'),
const Locale('ar'),
const Locale('es'),
const Locale('de'),
const Locale('fr'),
const Locale('el'),
const Locale('et'),
const Locale('nb'),
Expand All @@ -29,6 +31,9 @@ class MyApp extends StatelessWidget {
const Locale('uk'),
const Locale('hr'),
const Locale('tr'),
const Locale('lv'),
const Locale('lt'),
const Locale('ku'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'), // Generic Simplified Chinese 'zh_Hans'
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'), // Generic traditional Chinese 'zh_Hant'
],
Expand Down
8 changes: 8 additions & 0 deletions lib/src/country_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import 'res/strings/fr.dart';
import 'res/strings/gr.dart';
import 'res/strings/hr.dart';
import 'res/strings/ku.dart';
import 'res/strings/lt.dart';
import 'res/strings/lv.dart';
import 'res/strings/nb.dart';
import 'res/strings/nn.dart';
import 'res/strings/np.dart';
Expand Down Expand Up @@ -217,6 +219,10 @@ class CountryParser {
return fr;
case 'de':
return de;
case 'lv':
return lv;
case 'lt':
return lt;
case 'en':
default:
return en;
Expand Down Expand Up @@ -248,6 +254,8 @@ class CountryParser {
const Locale('tr'),
const Locale('hr'),
const Locale('de'),
const Locale('lv'),
const Locale('lv'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hans'),
const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'),
]..removeWhere((Locale l) => exclude.contains(l));
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: country_picker
description: A flutter package to select a country from a list of countries.

version: 2.0.15
version: 2.0.16

homepage: https://github.com/Daniel-Ioannou
repository: https://github.com/Daniel-Ioannou/flutter_country_picker
Expand Down

0 comments on commit ba3f676

Please sign in to comment.