Skip to content

Commit

Permalink
V2.0.3
Browse files Browse the repository at this point in the history
Merge pull request #20 from Daniel-Ioannou/v2.0.3
Close #19
  • Loading branch information
Daniel-Ioannou committed Mar 20, 2021
2 parents fb09505 + 4bbeac5 commit 53b4e0c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [2.0.3] - 20 Mar 2021
* Add toJson in currency model
* Fix incorrect currency symbols

## [2.0.2] - 18 Mar 2021

* Add more currency info:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A flutter package to select a currency from a list of currencies.
Add the package to your pubspec.yaml:

```yaml
currency_picker: ^2.0.2
currency_picker: ^2.0.3
```

In your dart file, import the library:
Expand Down
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 currency from a list of currencies.
Add the package to your pubspec.yaml:

```yaml
currency_picker: ^2.0.2
currency_picker: ^2.0.3
```

In your dart file, import the library:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.0.2"
version: "2.0.3"
fake_async:
dependency: transitive
description:
Expand Down
14 changes: 7 additions & 7 deletions lib/src/currencies.dart
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "RON",
"name": "Romania Leu",
"symbol": "lei",
"symbol": "L",
"flag": "RON",
"decimal_digits": 2,
"number": 946,
Expand Down Expand Up @@ -666,7 +666,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "GHS",
"name": "Ghana Cedi",
"symbol": "¢",
"symbol": "",
"flag": "GHS",
"decimal_digits": 2,
"number": 936,
Expand Down Expand Up @@ -783,7 +783,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "KZT",
"name": "Kazakhstan Tenge",
"symbol": "лв",
"symbol": "",
"flag": "KZT",
"decimal_digits": 2,
"number": 398,
Expand Down Expand Up @@ -848,7 +848,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "MDL",
"name": "Moldovan Leu",
"symbol": "MDL",
"symbol": "L",
"flag": "MDL",
"decimal_digits": 2,
"number": 498,
Expand Down Expand Up @@ -1030,7 +1030,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "PYG",
"name": "Paraguay Guarani",
"symbol": "Gs",
"symbol": "",
"flag": "PYG",
"decimal_digits": 0,
"number": 600,
Expand Down Expand Up @@ -1212,7 +1212,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "AMD",
"name": "Armenian Dram",
"symbol": "դր.",
"symbol": "֏",
"flag": "AM",
"decimal_digits": 0,
"number": 51,
Expand Down Expand Up @@ -1264,7 +1264,7 @@ List<Map<String, dynamic>> currencies = [
{
"code": "BYN",
"name": "Belarussian Ruble",
"symbol": "руб.",
"symbol": "Br",
"flag": "BY",
"decimal_digits": 2,
"number": 933,
Expand Down
14 changes: 14 additions & 0 deletions lib/src/currency.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,18 @@ class Currency {
decimalSeparator = json['decimal_separator'],
thousandsSeparator = json['thousands_separator'],
spaceBetweenAmountAndSymbol = json['space_between_amount_and_symbol'];

Map<String, dynamic> toJson() => {
'code': code,
'name': name,
'symbol': symbol,
'number': number,
'flag': flag,
'decimal_digits': decimalDigits,
'name_plural': namePlural,
'symbol_on_left': symbolOnLeft,
'decimal_separator': decimalSeparator,
'thousands_separator': thousandsSeparator,
'space_between_amount_and_symbol': spaceBetweenAmountAndSymbol,
};
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: A flutter package to select a currency from a list of currencies.
homepage: https://github.com/Daniel-Ioannou
repository: https://github.com/Daniel-Ioannou/flutter_currency_picker

version: 2.0.2
version: 2.0.3

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down

0 comments on commit 53b4e0c

Please sign in to comment.