Skip to content

Commit

Permalink
get items name by them symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
SepehrFakoori committed Jul 12, 2024
1 parent 03cf1b2 commit e581dff
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/util/get_coin_name_by_symbol.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
String getCoinFullName(String code) {
Map<String, String> coinMap = {
'GERAMI': 'GRAM COIN',
'ROB': 'QUARTER COIN',
'NIM': 'HALF COIN',
'SEKEB': 'BAHAR COIN',
'SEKEE': 'IMAMI COIN',
};

return coinMap[code.toUpperCase()] ?? 'Unknown Coin Code';
}
13 changes: 13 additions & 0 deletions lib/util/get_currency_name_by_symbol.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
String getCurrencyFullName(String code) {
Map<String, String> currencyMap = {
'DOLLAR': 'United States Dollar',
'EUR': 'Euro',
'AED': 'United Arab Emirates Dirham',
'GBP': 'Pound sterling',
'TRY': 'Turkish lira',
'CAD': 'Canadian Dollar',
'AUD': 'Australian Dollar'
};

return currencyMap[code.toUpperCase()] ?? 'Unknown Currency Code';
}
15 changes: 15 additions & 0 deletions lib/util/get_gold_name_by_symbol.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
String getGoldFullName(String code) {
Map<String, String> goldMap = {
'GERAM24': '24K GOLD',
'GERAM18': '18K GOLD',
'DASTE_DOOM': '2ND CLASS GOLD',
'MESGHAL': 'GOLD BULLION',
'AB_SHODE': 'MELTED GOLD',
'ONS': 'GOLD PRICE PER OUNCE',
'SILVER': 'SILVER',
'PLATINUM': 'PLATINUM',
'PALLADIUM': 'PALLADIUM',
};

return goldMap[code.toUpperCase()] ?? 'Unknown Gold Code';
}

0 comments on commit e581dff

Please sign in to comment.