Closed dleurs closed 1 year ago
Same issue with
class NotFoundLocation extends BeamLocation<BeamState> {
final String pathToGo;
NotFoundLocation({String path = '/', required String this.pathToGo}) : super(RouteInformation(location: path));
@override
List<String> get pathPatterns => [];
@override
List<BeamPage> buildPages(BuildContext context, BeamState state) => [
BeamPage(
key: ValueKey(NotFoundScreen.name + pathToGo),
title: Config.APP_NAME + ' ' + NotFoundScreen.name,
//type: BeamPageType.noTransition,
child: NotFoundScreen(
pathToGo: pathToGo,
),
),
];
}
Found solution
BeamerDelegate(
initialPath: NavConfig.FANFARES_URI.path,
notFoundPage: AppNotFound.beamPage(pathToRoot: NavConfig.FANFARES_URI.path),
locationBuilder: (routeInformation, _) {
if (routeInformation.location!.contains(NavConfig.FANFARES_URI.path)) {
return FanfaresLocation(routeInformation);
}
return NotFound(path: routeInformation.location!);
},
),
class AppNotFound {
static BeamPage beamPage({required String pathToRoot}) => BeamPage(
key: ValueKey(NotFoundScreen.name + pathToRoot),
title: Config.APP_NAME + ' ' + NotFoundScreen.name,
//type: BeamPageType.noTransition,
child: NotFoundScreen(pathToGo: pathToRoot),
);
}
Hello :)
I try to change not found page, unsuccessfully. Can you help me plz ?
I am using bottom_navigation_multiple_beamers example in my app
Initially I got this in every BeamerDelegate
But it is impossible for the user to go back to the root of the BeamerDelegate
I changed to
In order to go back to root of every beamerdelegate, which is working fine but now every indexes (except the initial one) start with this NotFoundScreen
https://user-images.githubusercontent.com/58068925/227663439-ac88d6b7-b68e-4522-86f7-b6a15bd9ff15.mp4
Thank you very much for your help !