import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/rewards_home_test_entity.dart'; RewardsHomeTestEntity $RewardsHomeTestEntityFromJson(Map json) { final RewardsHomeTestEntity rewardsHomeTestEntity = RewardsHomeTestEntity(); final int? id = jsonConvert.convert(json['id']); if (id != null) { rewardsHomeTestEntity.id = id; } final String? name = jsonConvert.convert(json['name']); if (name != null) { rewardsHomeTestEntity.name = name; } final List? rewards = (json['rewards'] as List?)?.map( (e) => e).toList(); if (rewards != null) { rewardsHomeTestEntity.rewards = rewards; } return rewardsHomeTestEntity; } Map $RewardsHomeTestEntityToJson(RewardsHomeTestEntity entity) { final Map data = {}; data['id'] = entity.id; data['name'] = entity.name; data['rewards'] = entity.rewards; return data; } extension RewardsHomeTestEntityExtension on RewardsHomeTestEntity { RewardsHomeTestEntity copyWith({ int? id, String? name, List? rewards, }) { return RewardsHomeTestEntity() ..id = id ?? this.id ..name = name ?? this.name ..rewards = rewards ?? this.rewards; } }