read static method

ActorIKConstraint read(
  1. ActorArtboard artboard,
  2. StreamReader reader,
  3. ActorIKConstraint? component
)
override

Implementation

static ActorIKConstraint read(ActorArtboard artboard, StreamReader reader,
    ActorIKConstraint? component) {
  // ignore: parameter_assignments
  component ??= ActorIKConstraint();
  ActorTargetedConstraint.read(artboard, reader, component);
  component._invertDirection = reader.readBool('isInverted');

  reader.openArray('bones');
  int numInfluencedBones = reader.readUint8Length();
  if (numInfluencedBones > 0) {
    component._influencedBones = <InfluencedBone>[];
    for (int i = 0; i < numInfluencedBones; i++) {
      // No label here, we're just clearing the elements from the array.
      component._influencedBones!.add(InfluencedBone(reader.readId('')));
    }
  }
  reader.closeArray();
  return component;
}