toJson method

  1. @override
Map<String, dynamic> toJson()
override

Convert the TransactionContract object to a JSON representation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    "type": type.name,
    "parameter": parameter.toJson(),
    "contract_name": StringUtils.tryDecode(contractName),
    "provider": StringUtils.tryDecode(provider),
    "Permission_id": permissionId
  }..removeWhere((key, value) => value == null);
}