2023-09-08 11:50:21 +02:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'category.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-07-17 17:37:41 +02:00
|
|
|
WalletCategory _$WalletCategoryFromJson(Map<String, dynamic> json) {
|
|
|
|
$checkKeys(
|
|
|
|
json,
|
|
|
|
requiredKeys: const ['id'],
|
|
|
|
disallowNullValues: const ['id'],
|
|
|
|
);
|
|
|
|
return WalletCategory(
|
|
|
|
name: json['name'] as String? ?? 'Unknown',
|
|
|
|
id: (json['id'] as num).toInt(),
|
|
|
|
icon: json['icon'] == null
|
|
|
|
? _defaultIcon()
|
|
|
|
: _iconDataFromJson(json['icon'] as Map<String, dynamic>),
|
|
|
|
color: json['color'] == null
|
|
|
|
? _defaultColor()
|
|
|
|
: _colorFromJson((json['color'] as num).toInt()),
|
|
|
|
);
|
|
|
|
}
|
2023-09-08 11:50:21 +02:00
|
|
|
|
|
|
|
Map<String, dynamic> _$WalletCategoryToJson(WalletCategory instance) =>
|
|
|
|
<String, dynamic>{
|
|
|
|
'name': instance.name,
|
|
|
|
'id': instance.id,
|
|
|
|
'icon': _iconDataToJson(instance.icon),
|
2024-01-08 15:38:31 +01:00
|
|
|
'color': _colorToJson(instance.color),
|
2023-09-08 11:50:21 +02:00
|
|
|
};
|