From 6f6d679619debfdaa514ff6a6d6285d1bbc38b91 Mon Sep 17 00:00:00 2001 From: Vicente Date: Wed, 25 Sep 2024 17:47:10 +0200 Subject: [PATCH] snapshot --- package/lib/src/beamer_delegate.dart | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/package/lib/src/beamer_delegate.dart b/package/lib/src/beamer_delegate.dart index 95aa504..13fe25a 100644 --- a/package/lib/src/beamer_delegate.dart +++ b/package/lib/src/beamer_delegate.dart @@ -1028,15 +1028,21 @@ class BeamerDelegate // Hidden pages for (int i = 0; i < _currentPages.length - 1; i++) { - pageStateNotifiers[_currentPages[i].key]! - ..value = BeamPageState(isPinnacle: false) - ..notifyListeners(ignore: isFirstBuild); + final notifier = pageStateNotifiers[_currentPages[i].key]; + if (notifier != null) { + notifier + ..value = BeamPageState(isPinnacle: false) + ..notifyListeners(ignore: isFirstBuild); + } } // Pinnacle page - pageStateNotifiers[_currentPages.last.key]! - ..value = BeamPageState(isPinnacle: true) - ..notifyListeners(ignore: isFirstBuild); + final notifier = pageStateNotifiers[_currentPages.last.key]; + if (notifier != null) { + notifier + ..value = BeamPageState(isPinnacle: true) + ..notifyListeners(ignore: isFirstBuild); + } } void _setBrowserTitle(BuildContext context) {