2024-07-17 16:44:02 +02:00
|
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
|
|
|
|
part of 'debt_entry.dart';
|
|
|
|
|
|
|
|
// **************************************************************************
|
|
|
|
// JsonSerializableGenerator
|
|
|
|
// **************************************************************************
|
|
|
|
|
2024-07-17 17:37:41 +02:00
|
|
|
DebtEntry _$DebtEntryFromJson(Map<String, dynamic> json) {
|
|
|
|
$checkKeys(
|
|
|
|
json,
|
|
|
|
requiredKeys: const ['id'],
|
|
|
|
disallowNullValues: const ['id'],
|
|
|
|
);
|
|
|
|
return DebtEntry(
|
|
|
|
id: (json['id'] as num).toInt(),
|
|
|
|
amount: (json['amount'] as num?)?.toInt() ?? 0,
|
|
|
|
name: json['name'] as String? ?? 'Unknown',
|
|
|
|
whoPayed: (json['whoPayed'] as List<dynamic>?)
|
|
|
|
?.map((e) => DebtPerson.fromJson(e as Map<String, dynamic>))
|
|
|
|
.toList() ??
|
|
|
|
DebtPerson.unknownPerson(),
|
|
|
|
);
|
|
|
|
}
|
2024-07-17 16:44:02 +02:00
|
|
|
|
|
|
|
Map<String, dynamic> _$DebtEntryToJson(DebtEntry instance) => <String, dynamic>{
|
|
|
|
'id': instance.id,
|
|
|
|
'amount': instance.amount,
|
|
|
|
'name': instance.name,
|
|
|
|
'whoPayed': instance.whoPayed,
|
|
|
|
};
|