import 'dart:core'; 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; List healthStreams; List expensesChart; static final Wallet emptyWallet = Wallet._empty(); Wallet({ required this.totalAssets, required this.totalTurkishLiraPool, required this.totalGoldInGram, required this.totalGoldInTurkishLira, required this.healthSteamDay, required this.healthStreams, required this.expensesChart, }); Wallet.fromMap(Map map) : totalAssets = map["total_assets"], totalTurkishLiraPool = map["total_turkish_lira"], totalGoldInGram = map["total_gold_in_gram"], totalGoldInTurkishLira = map["total_gold_in_turkish_lira"], healthSteamDay = map["health_stream_day"], healthStreams = (map["health_stream"] as List) .map((i) => HealthSteam.fromJson(i)) .toList(), expensesChart = []; Wallet._empty(): totalAssets = '', totalTurkishLiraPool = '', totalGoldInGram = '', totalGoldInTurkishLira = '', healthSteamDay = '', healthStreams = [], expensesChart = []; }