import 'dart:convert'; import 'package:cw_zano/api/model/receive.dart'; class EmployedEntries { final List receive; final List send; EmployedEntries({required this.receive, required this.send}); factory EmployedEntries.fromJson(Map json) => EmployedEntries( receive: json['receive'] == null ? [] : (json['receive'] as List) .map((e) => Receive.fromJson(e as Map)) .toList(), send: json['spent'] == null ? [] : (json['spent'] as List) .map((e) => Receive.fromJson(e as Map)) .toList(), ); }