findIkConstraint method

IkConstraintData? findIkConstraint(
  1. String name
)

Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method than to call it multiple times.

Implementation

IkConstraintData? findIkConstraint(String name) {
  final nativeName = name.toNativeUtf8(allocator: _allocator);
  final constraint = _bindings.spine_skeleton_data_find_ik_constraint(_data, nativeName.cast());
  _allocator.free(nativeName);
  if (constraint.address == nullptr.address) return null;
  return IkConstraintData._(constraint);
}