toJson method

  1. @override
Map<String, dynamic> toJson({
  1. bool visible = true,
})
override

Convert the TransactionContract object to a JSON representation.

Implementation

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