File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 11import 'dart:async' ;
22
3+ import 'package:flutter/foundation.dart' ;
34import 'package:flutter/material.dart' ;
45
56import '../extensions/extensions.dart' ;
@@ -315,7 +316,14 @@ class AutoAnimateSliverListController<T> {
315316 }
316317
317318 /// Do not use this method directly
318- void updateItems (List <T > updatedItems) => _items = updatedItems;
319+ void updateItems (List <T > updatedItems) {
320+ _items = updatedItems;
321+ // Added ticket provider null check to avoid unnecessary updates
322+ // during animations or when calling updateItemsWithAnimation
323+ if (_tickerProvider == null && ! listEquals (_items, _currentItems)) {
324+ _currentItems = List .from (_items);
325+ }
326+ }
319327
320328 /// Do not use this method directly
321329 void updateItemsWithAnimation ({
You can’t perform that action at this time.
0 commit comments