We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a90ced commit d56ed43Copy full SHA for d56ed43
1 file changed
lib/src/controller/auto_animated_sliver_list_controller.dart
@@ -1,5 +1,6 @@
1
import 'dart:async';
2
3
+import 'package:flutter/foundation.dart';
4
import 'package:flutter/material.dart';
5
6
import '../extensions/extensions.dart';
@@ -315,7 +316,14 @@ class AutoAnimateSliverListController<T> {
315
316
}
317
318
/// Do not use this method directly
- 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
327
328
329
void updateItemsWithAnimation({
0 commit comments