31 lines
977 B
Dart
31 lines
977 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'debt_entry.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
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(),
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$DebtEntryToJson(DebtEntry instance) => <String, dynamic>{
|
|
'id': instance.id,
|
|
'amount': instance.amount,
|
|
'name': instance.name,
|
|
'whoPayed': instance.whoPayed,
|
|
};
|