2020-12-08 07:58:14 +00:00
|
|
|
import 'package:robo_advisory/injection/dependency_injection.dart';
|
|
|
|
import 'package:robo_advisory/models/wallet.dart';
|
|
|
|
|
|
|
|
class WalletRepository {
|
|
|
|
static loadWallet() async {
|
|
|
|
switch (Injector.checkInjector()) {
|
|
|
|
case Flavor.MOCK:
|
|
|
|
return Wallet.fromMap(wallerJSON);
|
|
|
|
default:
|
|
|
|
// TODO: check how it will work with the API
|
|
|
|
return Wallet.fromMap(wallerJSON);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
final wallerJSON = {
|
|
|
|
'total_assets': '50,000.00 TL',
|
|
|
|
'total_turkish_lira': '5000.00 TL',
|
|
|
|
'total_gold_in_gram': '90.00g XAU',
|
|
|
|
'total_gold_in_turkish_lira': '45,000.00 TL',
|
2020-12-15 11:01:27 +00:00
|
|
|
'health_stream_day': 'Day 01',
|
|
|
|
'health_stream': [
|
|
|
|
{
|
|
|
|
"type": "Loss",
|
|
|
|
"value_in_percentage": 30,
|
|
|
|
"gold_in_gram": "90.00 gXAU",
|
|
|
|
"gold_price_in_turkish_lira": "50,000.00 TL",
|
|
|
|
"one_gram_gold_price_in_turkish_lira": "555.55 TL"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Equal",
|
|
|
|
"value_in_percentage": 50,
|
|
|
|
"gold_in_gram": "90.00 gXAU",
|
|
|
|
"gold_price_in_turkish_lira": "50,000.00 TL",
|
|
|
|
"one_gram_gold_price_in_turkish_lira": "555.55 TL"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "Gain",
|
|
|
|
"value_in_percentage": 20,
|
|
|
|
"gold_in_gram": "90.00 gXAU",
|
|
|
|
"gold_price_in_turkish_lira": "50,000.00 TL",
|
|
|
|
"one_gram_gold_price_in_turkish_lira": "555.55 TL"
|
|
|
|
}
|
|
|
|
]
|
2020-12-08 07:58:14 +00:00
|
|
|
};
|