Constraints constructor

Constraints({
  1. Iterable<LinearConstraint>? linearConstraint,
  2. Iterable<OrientationConstraint>? orientationConstraint,
  3. Iterable<CollisionSpecification>? collisionSpecification,
})

Implementation

factory Constraints({
  $core.Iterable<LinearConstraint>? linearConstraint,
  $core.Iterable<OrientationConstraint>? orientationConstraint,
  $core.Iterable<CollisionSpecification>? collisionSpecification,
}) {
  final $result = create();
  if (linearConstraint != null) {
    $result.linearConstraint.addAll(linearConstraint);
  }
  if (orientationConstraint != null) {
    $result.orientationConstraint.addAll(orientationConstraint);
  }
  if (collisionSpecification != null) {
    $result.collisionSpecification.addAll(collisionSpecification);
  }
  return $result;
}