addRenderItem method
Implementation
void addRenderItem(RenderItem<DecorationItem> renderItem) {
final uuid = const Uuid().v4();
final newRenderItem = renderItem.copyWith(uuid: uuid);
state = state.copyWith(
historyRenderItems: [
[
...state.historyRenderItems[state.currentHistoryIndex],
newRenderItem,
],
...state.historyRenderItems,
],
currentHistoryIndex: 0,
);
_paletteState.changeEditingText(false);
}