fromJson static method
Implementation
static TonWalletMessage? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return TonWalletMessage(
destinationAddress: (json['destination_address'] as String?) ?? '',
gramAmount: (json['gram_amount'] is int
? json['gram_amount'] as int
: int.tryParse(json['gram_amount']?.toString() ?? '')) ??
0,
sendMode: (json['send_mode'] as int?) ?? 0,
body: (json['body'] as String?) ?? '',
initialState: TonSmartContractInitialState.fromJson(
json['initial_state'] as Map<String, dynamic>?),
);
}