assignOwnership method Null safety

Future<String> assignOwnership(
  1. String source,
  2. TikiSdkDataTypeEnum type,
  3. List<String> contains,
  4. {String? about,
  5. String? origin}
)

Assign ownership to a given source.

The type identifies which TikiSdkDataTypeEnum the ownership refers to. The list of items the data contains is described by contains. Optionally, a description about this ownership can be giben in about and the origin can be overridden for the specific ownership grant. It returns a base64 url-safe representation of the OwnershipModel.transactionId.

Implementation

Future<String> assignOwnership(
    String source, TikiSdkDataTypeEnum type, List<String> contains,
    {String? about, String? origin}) async {
  OwnershipModel ownershipModel = await _ownershipService.create(
      source: source,
      type: type,
      origin: origin,
      about: about,
      contains: contains);
  return Bytes.base64UrlEncode(ownershipModel.transactionId!);
}