moveTo method

void moveTo({
  1. K? section,
  2. int? index,
  3. bool animate = true,
})

Moves this item to section and/or index. Forwards directly to SectionedListController.moveItem:

  • section non-null: reparents under that section (at index, or appended when index is null)
  • section null, index non-null: reorders within the current section
  • both null: no-op

Both forms run a paint-only FLIP slide when animate is true (the default). See SectionedListController.moveItem for exactly what slides on each path.

Implementation

void moveTo({K? section, int? index, bool animate = true}) {
  controller.moveItem(
    key,
    toSection: section,
    index: index,
    animate: animate,
  );
}