File tree Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Expand file tree Collapse file tree 1 file changed +0
-5
lines changed Original file line number Diff line number Diff line change @@ -197,22 +197,17 @@ abstract class MotionListBaseState<
197
197
}
198
198
199
199
void calculateDiff (List oldList, List newList) {
200
- // if(widget.onrReorder != null && oldList.length == newList.length) {
201
- // return;
202
- // }
203
200
// Detect removed and updated items
204
201
for (int i = oldList.length - 1 ; i >= 0 ; i-- ) {
205
202
if (newList.indexWhere ((element) => isSameItem (oldList[i], element)) ==
206
203
- 1 ) {
207
- print ("item is deleted: $i " );
208
204
listKey.currentState! .removeItem (i, removeItemDuration: removeDuration);
209
205
}
210
206
}
211
207
// Detect added items
212
208
for (int i = 0 ; i < newList.length; i++ ) {
213
209
if (oldList.indexWhere ((element) => isSameItem (newList[i], element)) ==
214
210
- 1 ) {
215
- print ("item is added: $i " );
216
211
listKey.currentState! .insertItem (i, insertDuration: insertDuration);
217
212
}
218
213
}
You can’t perform that action at this time.
0 commit comments