beamer
beamer copied to clipboard
Add functionality to refresh the navigator when route state is changed or some other overriding feature
Sometimes it is necessary to refresh the current route which has the same location (see issue #512). I tried your suggestion but it did not work for me because method _runGuards
returns true
for a BeamGuard
which returns a specific BeamLocation
and method update
exits before it calls notifyListeners
.
I investigated the method apply
of BeamGuad
and it always returns true
if
if( redirectionBeamLocation.state.routeInformaiton.location
!= target.state.routeInformation.location) {
return true;
}
It would be good if this condition also included routeInformation.state
check. Or maybe some parameter of BeamGuard
with signature bool Function(context,origin,target)
which can be used in above mentioned condition.
@bambinoua Indeed, it should also check RouteInformation.state
We have a problem with including a state
check because you cannot really define the state
if using BeamGuard.beamToNamed
. This will be reworked as a part of v2
which will focus on guards.