toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'to': to,
    'fee': fee.toJson(),
    'memo': memo,
    'from_subaccount': fromSubAccount != null ? [fromSubAccount] : [],
    'created_at_time': createdAtTime != null ? [createdAtTime!.toJson()] : [],
    'amount': amount.toJson(),
  }..removeWhere((key, value) => value == null);
}