Describe the bug
Using relative beaming to navigate, if some new routestate are provided they're ignored. So che beaminglocation routestate can't be updated.
Beamer version: 1.5.3
To Reproduce
Steps to reproduce the behavior:
Having a BeamLocation with this path : '/main/child'
use beamToNamed to '/main' with routeState: {anydata: 'hello'}
navigate using beamToNamed with relative beaming like: beamToNamed('child') with new routeState: {anydata: 'world'}
the state of the current beamLocation is still {anydata: 'hello'}
Expected behavior
The state now should be {anydata: 'world'}
Desktop (please complete the following information):
-any
Smartphone (please complete the following information):
-any
Additional context
This problem happens only if we use a relative beaming.
If we do beamToNamed('/main/child') with new routeState, the state is correctly updated.
The problem is on the function maybeAppend of utils.dart, there the routeinformations are merged to handle the relative beaming, but the state is ignored.
Describe the bug Using relative beaming to navigate, if some new routestate are provided they're ignored. So che beaminglocation routestate can't be updated.
Beamer version: 1.5.3
To Reproduce Steps to reproduce the behavior: Having a BeamLocation with this path : '/main/child'
Expected behavior The state now should be {anydata: 'world'}
Desktop (please complete the following information): -any
Smartphone (please complete the following information): -any
Additional context This problem happens only if we use a relative beaming. If we do beamToNamed('/main/child') with new routeState, the state is correctly updated. The problem is on the function maybeAppend of utils.dart, there the routeinformations are merged to handle the relative beaming, but the state is ignored.
static RouteInformation maybeAppend( RouteInformation current, RouteInformation incoming, ) { final incomingLocation = incoming.location; if (incomingLocation == null) { return current.copyWith(); } if (!incomingLocation.startsWith('/')) { return current.copyWith( location: current.location?.endsWith('/') ?? false ? '${current.location}$incomingLocation' : '${current.location}/$incomingLocation', ); } return incoming; }