Skip to content

Commit

Permalink
Add name parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
SepehrFakoori committed Jul 12, 2024
1 parent e581dff commit c574815
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/data/model/coin.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:currency_exchange_rate_app_flutter/util/get_coin_name_by_symbol.dart';

class Coin {
String? name;
String? symbol;
String? currentPrice;
String? high;
String? low;
Expand All @@ -9,6 +12,7 @@ class Coin {

Coin(
this.name,
this.symbol,
this.currentPrice,
this.high,
this.low,
Expand All @@ -19,6 +23,7 @@ class Coin {

factory Coin.fromMapJson(Map<String, dynamic> jsonObject) {
return Coin(
getCoinFullName(jsonObject["name"].toString().toUpperCase()),
jsonObject["name"],
jsonObject["p"],
jsonObject["h"],
Expand Down
5 changes: 5 additions & 0 deletions lib/data/model/currency.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:currency_exchange_rate_app_flutter/util/get_currency_name_by_symbol.dart';

class Currency {
String? name;
String? symbol;
String? currentPrice;
String? high;
String? low;
Expand All @@ -9,6 +12,7 @@ class Currency {

Currency(
this.name,
this.symbol,
this.currentPrice,
this.high,
this.low,
Expand All @@ -19,6 +23,7 @@ class Currency {

factory Currency.fromMapJson(Map<String, dynamic> jsonObject) {
return Currency(
getCurrencyFullName(jsonObject["name"].toString().toUpperCase()),
jsonObject["name"],
jsonObject["p"],
jsonObject["h"],
Expand Down
5 changes: 5 additions & 0 deletions lib/data/model/gold.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import 'package:currency_exchange_rate_app_flutter/util/get_gold_name_by_symbol.dart';

class Gold {
String? name;
String? symbol;
String? currentPrice;
String? high;
String? low;
Expand All @@ -9,6 +12,7 @@ class Gold {

Gold(
this.name,
this.symbol,
this.currentPrice,
this.high,
this.low,
Expand All @@ -19,6 +23,7 @@ class Gold {

factory Gold.fromMapJson(Map<String, dynamic> jsonObject) {
return Gold(
getGoldFullName(jsonObject["name"].toString().toUpperCase()),
jsonObject["name"],
jsonObject["p"],
jsonObject["h"],
Expand Down

0 comments on commit c574815

Please sign in to comment.