import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/rewards_home_tx_entity.dart'; RewardsHomeTxEntity $RewardsHomeTxEntityFromJson(Map json) { final RewardsHomeTxEntity rewardsHomeTxEntity = RewardsHomeTxEntity(); final double? id = jsonConvert.convert(json['id']); if (id != null) { rewardsHomeTxEntity.id = id; } final String? name = jsonConvert.convert(json['name']); if (name != null) { rewardsHomeTxEntity.name = name; } final List? rewards = (json['rewards'] as List?)?.map( (e) => e).toList(); if (rewards != null) { rewardsHomeTxEntity.rewards = rewards; } return rewardsHomeTxEntity; } Map $RewardsHomeTxEntityToJson(RewardsHomeTxEntity entity) { final Map data = {}; data['id'] = entity.id; data['name'] = entity.name; data['rewards'] = entity.rewards; return data; } extension RewardsHomeTxEntityExtension on RewardsHomeTxEntity { RewardsHomeTxEntity copyWith({ double? id, String? name, List? rewards, }) { return RewardsHomeTxEntity() ..id = id ?? this.id ..name = name ?? this.name ..rewards = rewards ?? this.rewards; } }