Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/src/controller/auto_animated_sliver_list_controller.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

import '../extensions/extensions.dart';
Expand Down Expand Up @@ -315,7 +316,14 @@ class AutoAnimateSliverListController<T> {
}

/// Do not use this method directly
void updateItems(List<T> updatedItems) => _items = updatedItems;
void updateItems(List<T> updatedItems) {
_items = updatedItems;
// Added ticket provider null check to avoid unnecessary updates
// during animations or when calling updateItemsWithAnimation
if (_tickerProvider == null && !listEquals(_items, _currentItems)) {
_currentItems = List.from(_items);
}
}

/// Do not use this method directly
void updateItemsWithAnimation({
Expand Down