Skip to content

Commit

Permalink
snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
busslina committed Sep 19, 2024
1 parent 19737bc commit f638d09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 0 additions & 9 deletions package/lib/src/beam_stack.dart
Original file line number Diff line number Diff line change
Expand Up @@ -462,15 +462,6 @@ class RoutesBeamStack extends BeamStack<BeamState> {
/// A wrapper used as [BeamStack.builder].
final Widget Function(BuildContext context, Widget navigator)? navBuilder;

/// They are regenerated on [buildPages],
/// so they are only valid for one build cycle.
///
/// The reason for not making them persistent across build cycles is that
/// we can't know the [BeamPage.key] before creating them (see [buildPages]).
// final Map<LocalKey, BeamPageNotifier> _pageNotifiers = {};
// final List<BeamPageNotifier> _pageNotifiers = [];
// final Map<ValueKey, BeamPageNotifier> _pageNotifiers = {};

@override
Widget builder(BuildContext context, Widget navigator) {
return navBuilder?.call(context, navigator) ?? navigator;
Expand Down
5 changes: 5 additions & 0 deletions package/lib/src/beamer_delegate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class BeamerDelegate extends RouterDelegate<RouteInformation>
updateListenable?.addListener(_update);
}

/// They are regenerated on [buildPages],
/// so they are only valid for one build cycle.
///
/// The reason for not making them persistent across build cycles is that
/// we can't know the [BeamPage.key] before creating them (see [buildPages]).
final Map<LocalKey, BeamPageStateNotifier> pageNotifiers = {};

bool _firstBuild = true;
Expand Down

0 comments on commit f638d09

Please sign in to comment.