prasule/lib/api/wallet.g.dart

41 lines
1.5 KiB
Dart
Raw Normal View History

2024-06-30 20:25:36 +02:00
// SPDX-FileCopyrightText: (C) 2024 Matyáš Caras
//
// SPDX-License-Identifier: AGPL-3.0-only
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(
name: json['name'] as String,
currency: _currencyFromJson(json['currency'] as Map<String, dynamic>),
categories: (json['categories'] as List<dynamic>?)
?.map((e) => WalletCategory.fromJson(e as Map<String, dynamic>))
.toList() ??
const [],
entries: (json['entries'] as List<dynamic>?)
?.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() ??
const [],
recurringEntries: (json['recurringEntries'] as List<dynamic>?)
?.map((e) =>
RecurringWalletEntry.fromJson(e as Map<String, dynamic>))
.toList() ??
const [],
starterBalance: (json['starterBalance'] as num?)?.toDouble() ?? 0,
2023-09-08 11:50:21 +02:00
);
Map<String, dynamic> _$WalletToJson(Wallet instance) => <String, dynamic>{
'recurringEntries': instance.recurringEntries,
2023-09-08 11:50:21 +02:00
'name': instance.name,
'categories': instance.categories,
'entries': instance.entries,
'starterBalance': instance.starterBalance,
2023-09-08 11:50:21 +02:00
'currency': instance.currency,
};