cake_wallet/cw_zano/lib/api/model/recent_history.dart

21 lines
686 B
Dart
Raw Normal View History

2024-03-16 10:55:03 +00:00
import 'package:cw_zano/api/model/transfer.dart';
2023-12-02 09:42:00 +00:00
class RecentHistory {
2024-03-16 10:55:03 +00:00
final List<Transfer>? history;
2023-12-02 09:42:00 +00:00
final int lastItemIndex;
final int totalHistoryItems;
RecentHistory(
{required this.history,
required this.lastItemIndex,
required this.totalHistoryItems});
factory RecentHistory.fromJson(Map<String, dynamic> json) => RecentHistory(
history: json['history'] == null ? null : (json['history'] as List<dynamic>)
2024-03-16 10:55:03 +00:00
.map((e) => Transfer.fromJson(e as Map<String, dynamic>))
2023-12-02 09:42:00 +00:00
.toList(),
lastItemIndex: json['last_item_index'] as int? ?? 0,
totalHistoryItems: json['total_history_items'] as int? ?? 0,
2023-12-02 09:42:00 +00:00
);
}