getDrawOrder method

List<Slot> getDrawOrder()

The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order.

Implementation

List<Slot> getDrawOrder() {
  final List<Slot> slots = [];
  final numSlots = _bindings.spine_skeleton_get_num_draw_order(_skeleton);
  final nativeDrawOrder = _bindings.spine_skeleton_get_draw_order(_skeleton);
  for (int i = 0; i < numSlots; i++) {
    slots.add(Slot._(nativeDrawOrder[i]));
  }
  return slots;
}