getApproved method
Get the approved address for a single NFT
Throws if tokenID
is not a valid NFT .
tokenAdd : An address for whom to query .
tokenAdd : The identifier for an NFT .
Implementation
Future<String> getApproved(BigInt tokenId_, _tokenAdd_) async {
final EthereumAddress contractAddr = EthereumAddress.fromHex(_tokenAdd_);
final contract =
DeployedContract(ContractAbi.fromJson(abiFile, 'XRC721'), contractAddr);
final getApprove = contract.function('getApproved');
final getApproved = await client
.call(contract: contract, function: getApprove, params: [tokenId_]);
return ('$getApproved');
}