added PageStorageKey to categories list to maintain its scroll position (#1088)

This commit is contained in:
ggurdin 2024-11-21 11:10:29 -05:00 committed by GitHub
parent 1c65aa393e
commit 563744288f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,6 +97,8 @@ class AnalyticsPopupState extends State<AnalyticsPopup> {
);
} else {
dialogContent = ListView.builder(
// Add a key to the ListView to persist the scroll position
key: const PageStorageKey<String>('categoryList'),
itemCount: _sortedEntries.length,
itemBuilder: (context, index) {
final category = _sortedEntries[index];