prasule/lib/api/wallet.g.dart
Matyáš Caras 17a3a1ce20 feat: add recurring entries (#20)
Reviewed-on: #20
2024-01-08 21:19:15 +01:00

36 lines
1.4 KiB
Dart

// 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(
(e) => WalletSingleEntry.fromJson(e as Map<String, dynamic>))
.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,
);
Map<String, dynamic> _$WalletToJson(Wallet instance) => <String, dynamic>{
'recurringEntries': instance.recurringEntries,
'name': instance.name,
'categories': instance.categories,
'entries': instance.entries,
'starterBalance': instance.starterBalance,
'currency': instance.currency,
};