#550 scroll to show item when navigating from Info page

This commit is contained in:
Thibault Deckers 2023-03-12 23:17:23 +01:00
parent 954853643a
commit 847dfbdb98
2 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
### Changed
- scroll to show item when navigating from Info page
- upgraded Flutter to stable v3.7.7
### Fixed

View file

@ -537,12 +537,14 @@ class _EntryViewerStackState extends State<EntryViewerStack> with EntryViewContr
if (baseCollection == null) return;
_onLeave();
final uri = entryNotifier.value?.uri;
Navigator.maybeOf(context)?.pushAndRemoveUntil(
MaterialPageRoute(
settings: const RouteSettings(name: CollectionPage.routeName),
builder: (context) => CollectionPage(
source: baseCollection.source,
filters: {...baseCollection.filters, filter},
highlightTest: uri != null ? (entry) => entry.uri == uri : null,
),
),
(route) => false,