refactor(model): freezed 패키지 도입으로 보일러플레이트 제거
- ItemStats, CombatStats, EquipmentItem을 freezed로 마이그레이션 - copyWith, toJson/fromJson 자동 생성 - 세이브 파일 호환성 유지
This commit is contained in:
27
lib/src/core/model/equipment_item.g.dart
Normal file
27
lib/src/core/model/equipment_item.g.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'equipment_item.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$EquipmentItemImpl _$$EquipmentItemImplFromJson(Map<String, dynamic> json) =>
|
||||
_$EquipmentItemImpl(
|
||||
name: json['name'] as String,
|
||||
slot: _slotFromJson(json['slot'] as String?),
|
||||
level: (json['level'] as num).toInt(),
|
||||
weight: (json['weight'] as num).toInt(),
|
||||
stats: ItemStats.fromJson(json['stats'] as Map<String, dynamic>),
|
||||
rarity: _rarityFromJson(json['rarity'] as String?),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$EquipmentItemImplToJson(_$EquipmentItemImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'slot': _slotToJson(instance.slot),
|
||||
'level': instance.level,
|
||||
'weight': instance.weight,
|
||||
'stats': instance.stats,
|
||||
'rarity': _rarityToJson(instance.rarity),
|
||||
};
|
||||
Reference in New Issue
Block a user