2023-09-08 11:50:21 +02:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'wallet.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
|
|
|
Wallet _$WalletFromJson(Map<String, dynamic> json) => Wallet(
|
2024-07-17 17:37:41 +02:00
|
|
|
name: json['name'] as String? ?? 'Unknown',
|
|
|
|
currency: json['currency'] == null
|
|
|
|
? _defaultCurrency()
|
|
|
|
: _currencyFromJson(json['currency'] as Map<String, dynamic>),
|
2023-09-08 11:50:21 +02:00
|
|
|
categories: (json['categories'] as List<dynamic>?)
|
|
|
|
?.map((e) => WalletCategory.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList() ??
|
2024-07-17 17:37:41 +02:00
|
|
|
_defaultWalletCategory(),
|
2023-09-08 11:50:21 +02:00
|
|
|
entries: (json['entries'] as List<dynamic>?)
|
2023-10-09 17:28:05 +02:00
|
|
|
?.map(
|
2023-12-31 11:42:27 +01:00
|
|
|
(e) => WalletSingleEntry.fromJson(e as Map<String, dynamic>))
|
2023-09-08 11:50:21 +02:00
|
|
|
.toList() ??
|
2024-07-17 17:37:41 +02:00
|
|
|
[],
|
2024-01-08 21:19:15 +01:00
|
|
|
recurringEntries: (json['recurringEntries'] as List<dynamic>?)
|
|
|
|
?.map((e) =>
|
|
|
|
RecurringWalletEntry.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList() ??
|
2024-07-17 17:37:41 +02:00
|
|
|
[],
|
2024-07-19 17:34:45 +02:00
|
|
|
debts: (json['debts'] as List<dynamic>?)
|
|
|
|
?.map((e) => DebtScenario.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList() ??
|
|
|
|
[],
|
2023-11-21 20:23:14 +01:00
|
|
|
starterBalance: (json['starterBalance'] as num?)?.toDouble() ?? 0,
|
2023-09-08 11:50:21 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> _$WalletToJson(Wallet instance) => <String, dynamic>{
|
2024-01-08 21:19:15 +01:00
|
|
|
'recurringEntries': instance.recurringEntries,
|
2023-09-08 11:50:21 +02:00
|
|
|
'name': instance.name,
|
|
|
|
'categories': instance.categories,
|
|
|
|
'entries': instance.entries,
|
2024-07-19 17:34:45 +02:00
|
|
|
'debts': instance.debts,
|
2023-11-21 20:23:14 +01:00
|
|
|
'starterBalance': instance.starterBalance,
|
2023-09-08 11:50:21 +02:00
|
|
|
'currency': instance.currency,
|
|
|
|
};
|