reorderCommand method
Reorder command.
Implementation
void reorderCommand(int from, int to) {
final value = selected;
if (value == null || from == to || from < 0 || to < 0 || from >= value.commands.length || to >= value.commands.length) {
return;
}
final commands = List<NmOperatorCommand>.of(value.commands);
final item = commands.removeAt(from);
commands.insert(to, item);
_update(value.copyWith(commands: commands));
}