transferOwnership method

Future<NftCollection> transferOwnership(
  1. String address
)

Transfers ownership of this collection. @warn Once ownership is transferred you cannot call mint methods anymore since you are the owner and you need to the smart contracts call directly on chain. @param address Address to which the ownership will be transferred. @returns Collection data.

Implementation

Future<NftCollection> transferOwnership(String address) async {
  final data = await ApillonApi.post<ICollection>(
    '$apiPrefix/transfer',
    {'address': address},
  );

  populate(data);

  ApillonLogger.log('NFT collection transferred successfully to $address');
  return this;
}