writeProperty method

PropertyIndex writeProperty({
  1. required String name,
  2. required PropertySig signature,
  3. PropertyAttributes flags = const PropertyAttributes(0),
})

Writes a Property row, returning the corresponding index.

Implementation

PropertyIndex writeProperty({
  required String name,
  required PropertySig signature,
  PropertyAttributes flags = const PropertyAttributes(0),
}) {
  final table = _tableStream[MetadataTableId.property];
  final index = PropertyIndex(table.length);
  table.add(
    Property(
      flags: flags,
      name: _stringHeap.insert(name),
      type: _writePropertySig(signature),
    ),
  );
  return index;
}