dev
dart 21 lines 699 Bytes
Raw
1 import 'package:cw_zano/api/model/receive.dart';
2
3 class EmployedEntries {
4 final List<Receive> receive;
5 final List<Receive> send;
6
7 EmployedEntries({required this.receive, required this.send});
8
9 factory EmployedEntries.fromJson(Map<String, dynamic> json) => EmployedEntries(
10 receive: json['receive'] == null
11 ? []
12 : (json['receive'] as List<dynamic>)
13 .map((e) => Receive.fromJson(e as Map<String, dynamic>))
14 .toList(),
15 send: json['spent'] == null
16 ? []
17 : (json['spent'] as List<dynamic>)
18 .map((e) => Receive.fromJson(e as Map<String, dynamic>))
19 .toList(),
20 );
21 }