title method Null safety

Future<TitleRecord> title(
  1. String ptr,
  2. {String? origin,
  3. List<TitleTag> tags = const [],
  4. String? description}
)

Create a new TitleRecord.

Parameters:

ptr - The Pointer Records identifies data stored in your system, similar to a foreign key. Learn more about selecting good pointer records.

origin - An optional override of the default origin specified in init. Follow a reverse-DNS syntax. i.e. com.myco.myapp

tags - A List of metadata tags included in the TitleRecord describing the asset, for your use in record search and filtering. Learn more about adding tags.

description - A short, human-readable, description of the TitleRecord as a future reminder.

Returns the created TitleRecord

Implementation

Future<TitleRecord> title(String ptr,
    {String? origin,
    List<TitleTag> tags = const [],
    String? description}) async {
  ptr = _hashPtr(ptr);
  TitleModel title = await _titleService.create(ptr,
      origin: origin, description: description, tags: tags);
  return TitleRecord(Bytes.base64UrlEncode(title.transactionId!), title.ptr,
      origin: title.origin, tags: title.tags, description: title.description);
}