fromJson static method
- Map json
Implementation
static TransferIntent fromJson(Map json) {
return switch (json) {
{
'recipient': String recipient,
'amount': Map amount,
'token': Map token,
'fee': Map? fee,
'memo': String? memo,
} =>
TransferIntent(
recipient: recipient,
amount: Amount.fromJson(amount),
feeInfo: fee == null ? null : FeeInformation.fromJson(fee),
token: CoinEntity.fromJson(token),
memo: memo,
),
_ => throw FormatException('Unknown TransferIntent: $json'),
};
}