prettifyNotes function
Map
prettifyNotes(
- dynamic data
)
Implementation
Map prettifyNotes(dynamic data) {
Map notes = {
'resin': data['current_resin'],
'until_resin_limit': data['resin_recovery_time'],
'max_resin': data['max_resin'],
'total_commissions': data['total_task_num'],
'completed_commissions': data['finished_task_num'],
'claimed_commission_reward': data['is_extra_task_reward_received'],
'max_boss_discounts': data['resin_discount_num_limit'],
'remaining_boss_discounts': data['remain_resin_discount_num'],
'max_expeditions': data['max_expedition_num'],
'realm_currency': data['current_home_coin'],
'max_realm_currency': data['max_home_coin'],
'until_realm_currency_limit': data['home_coin_recovery_time'],
'expeditions': [],
};
var expeditions = data['expeditions'];
for (var i = 0; i < expeditions.length; i++) {
var exp = expeditions[i];
notes['expeditions'].add({
'icon': exp['avatar_side_icon'],
'remaining_time': exp['remained_time'],
'status': exp['status'],
});
}
return notes;
}