ownerOf method
tokenAddress The address of the token. tokenId The identifier for an NFT. String representing the address of the owner of the NFT .
Implementation
Future<String> ownerOf(BigInt tokenId, String _tokenAddr) async {
final EthereumAddress contractAddr = EthereumAddress.fromHex(_tokenAddr);
final contract =
DeployedContract(ContractAbi.fromJson(abiFile, 'XRC721'), contractAddr);
final ownerOf = contract.function('ownerOf');
final ownerof = await client
.call(contract: contract, function: ownerOf, params: [tokenId]);
return ('$ownerof');
}