remove method

void remove({
  1. required int index,
  2. bool animation = true,
})

Remove Grid Item to update itemList, and render DragGrid

Implementation

void remove({required int index, bool animation = true}) {
  if (index < 0) {
    index = itemList.length + index;
  }

  if (index >= 0 && index < _itemList.length) {
    _itemList.removeAt(index);
    _animation = animation;
    notifyListeners();
  }
}