writeCustomAttribute method

void writeCustomAttribute({
  1. required HasCustomAttribute parent,
  2. required CustomAttributeType type,
  3. List<FixedArg> fixedArgs = const [],
  4. List<NamedArg> namedArgs = const [],
})

Writes a CustomAttribute row.

Implementation

void writeCustomAttribute({
  required HasCustomAttribute parent,
  required CustomAttributeType type,
  List<FixedArg> fixedArgs = const [],
  List<NamedArg> namedArgs = const [],
}) {
  _customAttributes
      .putIfAbsent(parent, () => [])
      .add(
        CustomAttribute(
          parent: parent,
          type: type,
          value: _writeCustomAttributeValue(fixedArgs, namedArgs),
        ),
      );
}