changeDeletePosition method

void changeDeletePosition(
  1. String uuid,
  2. bool isDeletePosition
)

Implementation

void changeDeletePosition(String uuid, bool isDeletePosition) {
  state = state.copyWith(
    historyRenderItems: [
      state.renderItems
          .map(
            (item) => item.uuid == uuid
                ? item.copyWith(deletePosition: isDeletePosition)
                : item,
          )
          .toList(),
      ...state.historyRenderItems,
    ],
    currentHistoryIndex: 0,
  );
}