2020-12-15 11:01:27 +00:00
|
|
|
import 'dart:core';
|
2020-12-08 07:58:14 +00:00
|
|
|
import 'package:robo_advisory/models/healthSteam.dart';
|
|
|
|
import 'package:robo_advisory/models/expenses.dart';
|
|
|
|
|
|
|
|
class Wallet {
|
|
|
|
String totalAssets;
|
|
|
|
String totalTurkishLiraPool;
|
|
|
|
String totalGoldInGram;
|
|
|
|
String totalGoldInTurkishLira;
|
|
|
|
String healthSteamDay;
|
2020-12-15 11:01:27 +00:00
|
|
|
List<HealthSteam> healthStreams;
|
2020-12-08 07:58:14 +00:00
|
|
|
List<Expenses> expensesChart;
|
|
|
|
|
2022-09-11 14:37:28 +00:00
|
|
|
static final Wallet emptyWallet = Wallet._empty();
|
|
|
|
|
2020-12-08 07:58:14 +00:00
|
|
|
Wallet({
|
2022-09-11 14:37:28 +00:00
|
|
|
required this.totalAssets,
|
|
|
|
required this.totalTurkishLiraPool,
|
|
|
|
required this.totalGoldInGram,
|
|
|
|
required this.totalGoldInTurkishLira,
|
|
|
|
required this.healthSteamDay,
|
|
|
|
required this.healthStreams,
|
|
|
|
required this.expensesChart,
|
2020-12-08 07:58:14 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Wallet.fromMap(Map<String, dynamic> map)
|
|
|
|
: totalAssets = map["total_assets"],
|
|
|
|
totalTurkishLiraPool = map["total_turkish_lira"],
|
|
|
|
totalGoldInGram = map["total_gold_in_gram"],
|
|
|
|
totalGoldInTurkishLira = map["total_gold_in_turkish_lira"],
|
2020-12-15 11:01:27 +00:00
|
|
|
healthSteamDay = map["health_stream_day"],
|
|
|
|
healthStreams = (map["health_stream"] as List)
|
|
|
|
.map((i) => HealthSteam.fromJson(i))
|
2022-09-11 14:37:28 +00:00
|
|
|
.toList(),
|
|
|
|
expensesChart = [];
|
|
|
|
|
|
|
|
Wallet._empty():
|
|
|
|
totalAssets = '',
|
|
|
|
totalTurkishLiraPool = '',
|
|
|
|
totalGoldInGram = '',
|
|
|
|
totalGoldInTurkishLira = '',
|
|
|
|
healthSteamDay = '',
|
|
|
|
healthStreams = [],
|
|
|
|
expensesChart = [];
|
2020-12-08 07:58:14 +00:00
|
|
|
}
|