Open vixez opened 1 year ago
Describe the bug When I navigate to a specific route, and then hot reload it shows the NotFound screen. However before the hot reload it showed the correct screen.
NotFound
Beamer version: 1.5.3
To Reproduce Route
const String kHomeIncentiveDetailConfirmOrderRoute = '/home/incentive/$kIncentiveIdRoute/confirm-order'; // Parameters const String kIncentiveId = 'incentiveId'; const String kIncentiveIdRoute = ':$kIncentiveId';
Location
class TabIncentivesLocation extends BeamLocation<BeamState> { TabIncentivesLocation(RouteInformation routeInformation) : super(routeInformation); @override List<String> get pathPatterns => [ kHomeIncentivesTabRoute, kHomeIncentiveDetailRoute, kHomeIncentiveDetailConfirmOrderRoute, '$kHomeRoute/*', ]; @override List<BeamPage> buildPages(BuildContext context, BeamState state) => [ const BeamPage( key: ValueKey('incentives'), type: BeamPageType.noTransition, child: TabIncentives(), ), if (state.pathParameters.containsKey(kIncentiveId) && !state.uri.pathSegments.contains('confirm-order')) BeamPage( key: ValueKey( 'incentive/${state.pathParameters[kIncentiveId]}/detail'), type: BeamPageType.material, child: TabIncentivesDetail( id: int.parse(state.pathParameters[kIncentiveId]!), ), ), if (state.pathParameters.containsKey(kIncentiveId) && state.uri.pathSegments.contains('confirm-order')) BeamPage( key: ValueKey( 'incentive/${state.pathParameters[kIncentiveId]}/confirm-order'), type: BeamPageType.material, child: TabIncentivesConfirmOrder( id: int.parse(state.pathParameters[kIncentiveId]!), ), ), ]; }
Navigating:
Beamer.of(context).beamToNamed( kHomeIncentiveDetailConfirmOrderRoute.replaceAll( kIncentiveIdRoute, '${incentive.id}', ), data: incentive, );
Expected behavior Hot reloading does not result in NotFound.
Additional context This does not happen on every route, but this one is consistent. What am I doing wrong?
I'm also interested in what is the cause of this behavior.
Describe the bug When I navigate to a specific route, and then hot reload it shows the
NotFound
screen. However before the hot reload it showed the correct screen.Beamer version: 1.5.3
To Reproduce Route
Location
Navigating:
Expected behavior Hot reloading does not result in
NotFound
.Additional context This does not happen on every route, but this one is consistent. What am I doing wrong?