30 lines
1,014 B
Dart
30 lines
1,014 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'entry.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
WalletEntry _$WalletEntryFromJson(Map<String, dynamic> json) => WalletEntry(
|
|
name: json['name'] as String,
|
|
amount: (json['amount'] as num).toDouble(),
|
|
type: $enumDecode(_$EntryTypeEnumMap, json['type']),
|
|
date: DateTime.parse(json['date'] as String),
|
|
category:
|
|
WalletCategory.fromJson(json['category'] as Map<String, dynamic>),
|
|
);
|
|
|
|
Map<String, dynamic> _$WalletEntryToJson(WalletEntry instance) =>
|
|
<String, dynamic>{
|
|
'type': _$EntryTypeEnumMap[instance.type]!,
|
|
'name': instance.name,
|
|
'amount': instance.amount,
|
|
'date': instance.date.toIso8601String(),
|
|
'category': instance.category,
|
|
};
|
|
|
|
const _$EntryTypeEnumMap = {
|
|
EntryType.expense: 'expense',
|
|
EntryType.income: 'income',
|
|
};
|