tokenByIndex method

Future<String> tokenByIndex(
  1. BigInt index,
  2. String _token_Add_
)

Enumerate NFTs assigned to an owner tokenAddress An address for whom to query . IndexNO A counter less than totalSupply() The token identifier for the indexth NFT assigned to owner

Implementation

Future<String> tokenByIndex(BigInt index, String _token_Add_) async {
  final EthereumAddress contractAddr = EthereumAddress.fromHex(_token_Add_);

  final contract =
      DeployedContract(ContractAbi.fromJson(abiFile, 'XRC721'), contractAddr);
  final getTokenbyIndex = contract.function('tokenByIndex');
  final tokenByIndex = await client
      .call(contract: contract, function: getTokenbyIndex, params: [index]);
  return ('$tokenByIndex');
}