setAttachment method

void setAttachment(
  1. String slotName,
  2. String attachmentName
)

Implementation

void setAttachment(String slotName, String attachmentName) {
  final slotNameNative = slotName.toNativeUtf8(allocator: _allocator);
  final attachmentNameNative = attachmentName.toNativeUtf8(allocator: _allocator);
  _bindings.spine_skeleton_set_attachment(_skeleton, slotNameNative.cast(), attachmentNameNative.cast());
  _allocator.free(slotNameNative);
  _allocator.free(attachmentNameNative);
}