moveTo method

void moveTo({
  1. K? section,
  2. int? index,
})

Moves this item to section and/or index.

Dispatches to the controller as follows:

section != null, index != nullSectionedListController.moveItem with both args • section != null, index == nullSectionedListController.moveItem (appends to section) • section == null, index != nullSectionedListController.moveItemInSectionsection == null, index == null → no-op

No animate parameter: the underlying TreeController.moveNode / TreeController.reorderChildren are repositioning ops — nothing animates. Matches the controller-level signatures.

Implementation

void moveTo({K? section, int? index}) {
  if (section != null) {
    controller.moveItem(key, toSection: section, index: index);
  } else if (index != null) {
    controller.moveItemInSection(key, index);
  }
  // both null → no-op.
}