void setGroup(List<Command> list) { if (!canBeGrouped) { return; } grouped = list; grouped.sort((a, b) => a.id.compareTo(b.id)); }