| 1 | import 'package:cw_zano/zano_formatter.dart'; |
| 2 | |
| 3 | class Subtransfer { |
| 4 | final BigInt amount; |
| 5 | final String assetId; |
| 6 | final bool isIncome; |
| 7 | |
| 8 | Subtransfer({required this.amount, required this.assetId, required this.isIncome}); |
| 9 | |
| 10 | factory Subtransfer.fromJson(Map<String, dynamic> json) => Subtransfer( |
| 11 | amount: ZanoFormatter.bigIntFromDynamic(json['amount']), |
| 12 | assetId: json['asset_id'] as String? ?? '', |
| 13 | isIncome: json['is_income'] as bool? ?? false, |
| 14 | ); |
| 15 | } |